/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0066ff;
    --primary-hover: #0052cc;
    --secondary-color: #ff6b00;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;
    --background-primary: #ffffff;
    --background-secondary: #f5f7fa;
    --background-tertiary: #e8ecf1;
    --border-color: #d1d5db;
    --border-light: #e5e7eb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --gradient-rainbow: linear-gradient(135deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3, #54a0ff);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-primary);
    overflow-x: hidden;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-decoration: none;
}

.logo-icon {
    font-size: 28px;
    background: var(--gradient-rainbow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all var(--transition-fast);
    font-weight: 500;
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: var(--background-secondary);
}

.nav-link.active {
    color: var(--primary-color);
    background-color: var(--background-secondary);
    font-weight: 600;
}

.nav-auth {
    display: flex;
    gap: 12px;
}

.btn-login {
    padding: 8px 20px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Main Content */
.main {
    padding-top: 64px;
    min-height: 100vh;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #48dbfb 75%, #10b981 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    overflow: hidden;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 40px 24px;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 12px;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-description {
    font-size: 18px;
    margin-bottom: 32px;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.6s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-primary {
    padding: 14px 32px;
    background: white;
    color: var(--primary-color);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    padding: 14px 32px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.hero-visual {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rainbow-animation {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: var(--gradient-rainbow);
    opacity: 0.1;
    filter: blur(60px);
    animation: rainbowRotate 20s linear infinite;
}

@keyframes rainbowRotate {
    from { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    to { transform: rotate(360deg) scale(1); }
}

/* Features Section */
.features {
    padding: 80px 24px;
    background-color: var(--background-secondary);
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 48px;
    color: var(--text-primary);
}

.features-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.feature-card {
    background: white;
    padding: 40px 32px;
    border-radius: 16px;
    text-align: center;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.5;
}

/* Members Section */
.members {
    padding: 80px 24px;
    background-color: var(--background-primary);
}

.members-container {
    max-width: 1200px;
    margin: 0 auto;
}

.members-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.btn-join {
    padding: 12px 24px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.btn-join:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.members-wall {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.member-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    text-align: center;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.member-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.member-card.virtual {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
}

.member-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--gradient-rainbow);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.avatar-placeholder {
    font-size: 40px;
}

.member-info h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.member-info p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Community Section */
.community {
    padding: 0;
}

.chat-section {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.chat-header {
    padding: 20px 24px;
    background: var(--background-secondary);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.online {
    background-color: var(--success-color);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    color: var(--text-secondary);
    font-size: 14px;
}

.chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--background-secondary);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.chat-message {
    display: flex;
    gap: 12px;
    animation: fadeInUp 0.3s ease;
}

.message-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: var(--gradient-rainbow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.message-content {
    flex: 1;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.message-username {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.message-time {
    color: var(--text-muted);
    font-size: 12px;
}

.message-text {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.chat-input-container {
    padding: 16px 24px;
    background: var(--background-secondary);
    border-top: 1px solid var(--border-light);
}

.chat-input-wrapper {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px;
    transition: all var(--transition-fast);
    background: white;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.btn-send {
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-send:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.chat-hint {
    padding: 12px 16px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
    border-left: 4px solid var(--warning-color);
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mute-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.mute-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
}

.hint-text {
    color: var(--warning-color);
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
}

.hint-text strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
    color: var(--text-primary);
}

.hint-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.hint-text a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background-color: var(--background-secondary);
    padding: 60px 24px 24px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section .logo {
    margin-bottom: 16px;
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.footer-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color var(--transition-fast);
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 13px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-content.profile-modal-content {
    max-width: 600px;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--background-secondary);
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--error-color);
    color: white;
}

.modal-body {
    padding: 24px;
}

.modal-description {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 16px;
}

.login-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    background: white;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.login-btn:hover {
    border-color: var(--primary-color);
    background: var(--background-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.login-btn svg {
    width: 24px;
    height: 24px;
}

.login-btn.github svg {
    color: #24292e;
}

.login-btn.gitee svg {
    color: #c71d23;
}

.login-btn.webauthn svg {
    color: var(--primary-color);
}

.modal-note {
    text-align: center;
    color: var(--text-muted);
    margin-top: 20px;
    font-size: 13px;
}

/* Profile Modal Styles */
.profile-section {
    margin-bottom: 32px;
}

.profile-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.section-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px;
    transition: all var(--transition-fast);
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.form-input:read-only {
    background: var(--background-secondary);
    cursor: not-allowed;
}

.linked-accounts,
.merge-accounts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.account-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--background-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.account-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.account-info {
    flex: 1;
}

.account-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.account-email {
    color: var(--text-muted);
    font-size: 12px;
}

.account-actions {
    display: flex;
    gap: 8px;
}

.btn-unlink {
    padding: 6px 12px;
    background: white;
    color: var(--error-color);
    border: 1px solid var(--error-color);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-unlink:hover {
    background: var(--error-color);
    color: white;
}

.merge-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--background-secondary);
    border-radius: 8px;
    border: 2px solid var(--border-light);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.merge-option:hover {
    border-color: var(--primary-color);
    background: white;
}

.merge-option.selected {
    border-color: var(--primary-color);
    background: rgba(0, 102, 255, 0.05);
}

.merge-radio {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
}

.btn-add-account {
    width: 100%;
    padding: 12px;
    background: white;
    color: var(--primary-color);
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-add-account:hover {
    background: var(--background-secondary);
}

.profile-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-save {
    flex: 1;
    padding: 12px 24px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-logout {
    padding: 12px 24px;
    background: white;
    color: var(--error-color);
    border: 2px solid var(--error-color);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-logout:hover {
    background: var(--error-color);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 20px;
    }

    .hero-description {
        font-size: 16px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .members-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .chat-messages {
        height: 300px;
    }

    .modal-content {
        max-width: 95%;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }