/* ===== CSS Variables ===== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-card: #15151f;
    --bg-hover: #1f1f2e;
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    
    --accent-primary: #8b5cf6;
    --accent-secondary: #a78bfa;
    --accent-glow: rgba(139, 92, 246, 0.3);
    
    --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #8b5cf6 100%);
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    --border-color: #2a2a3a;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --border-radius-full: 9999px;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px var(--accent-glow);
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-secondary);
}

img {
    max-width: 100%;
    display: block;
}

input, button, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

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

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-icon {
    padding: 10px;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
}

.btn-small {
    padding: 6px;
    width: 28px;
    height: 28px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== Navbar ===== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 40px;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.nav-brand i {
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ===== Gradient Text ===== */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Landing Page ===== */
.landing-page {
    overflow-x: hidden;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 120px 80px 80px;
    gap: 60px;
    background: 
        radial-gradient(ellipse at 20% 50%, var(--accent-glow) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 40%),
        var(--bg-primary);
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chat-preview {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    transition: transform var(--transition-slow);
}

.chat-preview:hover {
    transform: perspective(1000px) rotateY(0) rotateX(0);
}

.preview-header {
    display: flex;
    gap: 8px;
    padding: 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.preview-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.preview-dot.red { background: #ef4444; }
.preview-dot.yellow { background: #f59e0b; }
.preview-dot.green { background: #10b981; }

.preview-messages {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.preview-msg {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.preview-msg.sent {
    justify-content: flex-end;
}

.preview-msg .msg-avatar {
    width: 36px;
    height: 36px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.preview-msg .msg-content {
    background: var(--bg-tertiary);
    padding: 10px 14px;
    border-radius: var(--border-radius);
    max-width: 70%;
}

.preview-msg.sent .msg-content {
    background: var(--accent-primary);
}

.preview-msg .msg-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-secondary);
    display: block;
    margin-bottom: 4px;
}

.preview-msg .msg-content p {
    font-size: 14px;
    color: var(--text-primary);
}

/* ===== Features Section ===== */
.features {
    padding: 100px 80px;
    background: var(--bg-secondary);
}

.section-title {
    text-align: center;
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 60px;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 40px 30px;
    text-align: center;
    transition: all var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    margin: 0 auto 24px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

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

/* ===== Footer ===== */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 40px;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-brand i {
    color: var(--accent-primary);
}

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

/* ===== Auth Pages ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: 
        radial-gradient(ellipse at 30% 30%, var(--accent-glow) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 70%, rgba(236, 72, 153, 0.1) 0%, transparent 40%),
        var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 100px,
        rgba(139, 92, 246, 0.02) 100px,
        rgba(139, 92, 246, 0.02) 200px
    );
    animation: auth-bg-move 30s linear infinite;
}

@keyframes auth-bg-move {
    from { transform: translateX(0) translateY(0); }
    to { transform: translateX(100px) translateY(100px); }
}

.auth-container {
    display: flex;
    width: 100%;
    max-width: 1000px;
    min-height: 600px;
    margin: 20px;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
    animation: auth-card-appear 0.6s ease;
}

@keyframes auth-card-appear {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-card {
    flex: 1;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: auth-content-appear 0.6s ease 0.2s both;
}

@keyframes auth-content-appear {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 30px;
}

.auth-logo i {
    color: var(--accent-primary);
}

.auth-header h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-secondary);
}

.auth-visual {
    flex: 1;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px;
    position: relative;
    overflow: hidden;
}

.auth-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: pattern-move 20s linear infinite;
}

@keyframes pattern-move {
    from { transform: translateX(0) translateY(0); }
    to { transform: translateX(60px) translateY(60px); }
}

.visual-content {
    text-align: center;
    color: white;
    position: relative;
    z-index: 1;
}

.visual-content i {
    font-size: 80px;
    margin-bottom: 30px;
    opacity: 0.9;
    animation: float-icon 3s ease-in-out infinite;
}

@keyframes float-icon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.visual-content h2 {
    font-size: 28px;
    margin-bottom: 16px;
}

.visual-content p {
    opacity: 0.9;
    max-width: 300px;
}

.auth-footer {
    text-align: center;
    margin-top: 30px;
    color: var(--text-secondary);
}

.auth-footer a {
    font-weight: 500;
}

/* ===== Forms ===== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
}

.forgot-link {
    color: var(--accent-primary);
    font-size: 14px;
}

.form-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 12px 16px;
    border-radius: var(--border-radius);
    font-size: 14px;
    display: none;
}

.form-error.show {
    display: block;
}

.form-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
    padding: 12px 16px;
    border-radius: var(--border-radius);
    font-size: 14px;
    display: none;
}

.form-success.show {
    display: block;
}

.password-strength {
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: all var(--transition-normal);
}

.strength-bar.weak { width: 33%; background: var(--danger); }
.strength-bar.medium { width: 66%; background: var(--warning); }
.strength-bar.strong { width: 100%; background: var(--success); }

.char-count {
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
}

/* ===== Chat Page ===== */
.chat-page {
    height: 100vh;
    overflow: hidden;
}

.chat-container {
    display: flex;
    height: 100vh;
}

/* Chat Sidebar */
.chat-sidebar {
    width: 300px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(18, 18, 26, 0.98) 100%);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-normal), width var(--transition-normal);
    position: relative;
    z-index: 10;
}

.chat-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-primary), transparent);
    opacity: 0.3;
}

.chat-sidebar.collapsed {
    transform: translateX(-100%);
    position: absolute;
}

.chat-sidebar .sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(139, 92, 246, 0.05);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
}

.sidebar-logo i {
    color: var(--accent-primary);
    font-size: 24px;
    animation: pulse-glow 3s infinite;
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.05) 100%);
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-normal);
}

.sidebar-profile:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(236, 72, 153, 0.1) 100%);
}

.profile-avatar {
    width: 46px;
    height: 46px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.profile-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.5);
}

.profile-avatar::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--gradient-primary);
    border-radius: 50%;
    z-index: -1;
    animation: rotate-border 3s linear infinite;
    opacity: 0.5;
}

@keyframes rotate-border {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.profile-status i {
    font-size: 8px;
}

.profile-status.online i { color: var(--success); }
.profile-status.away i { color: var(--warning); }
.profile-status.busy i { color: var(--danger); }

.sidebar-section {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8px;
    margin-bottom: 12px;
}

.section-header h3 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge {
    background: var(--accent-primary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--border-radius-full);
}

.room-list, .user-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.room-item, .user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

.room-item::before, .user-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--gradient-primary);
    transform: scaleY(0);
    transition: transform var(--transition-fast);
}

.room-item:hover, .user-item:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.2);
}

.room-item:hover::before, .user-item:hover::before {
    transform: scaleY(0.5);
}

.room-item.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(236, 72, 153, 0.1) 100%);
    border: 1px solid var(--accent-primary);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.room-item.active::before {
    transform: scaleY(1);
}

.room-icon {
    width: 38px;
    height: 38px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.room-item:hover .room-icon {
    background: rgba(139, 92, 246, 0.2);
    color: var(--accent-primary);
}

.room-item.active .room-icon {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

/* DM List Styles */
.dm-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dm-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    border: 1px solid transparent;
}

.dm-item:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.2);
}

.dm-item.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(236, 72, 153, 0.1) 100%);
    border: 1px solid var(--accent-primary);
}

.dm-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
}

.dm-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dm-name {
    font-size: 14px;
    color: var(--text-primary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dm-empty {
    color: var(--text-muted);
    font-size: 13px;
    padding: 12px;
    text-align: center;
}

.user-item {
    cursor: pointer;
}

.room-info {
    flex: 1;
    min-width: 0;
}

.room-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.room-preview {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar .status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
}

.status-dot.online { background: var(--success); }
.status-dot.away { background: var(--warning); }
.status-dot.busy { background: var(--danger); }
.status-dot.offline { background: var(--text-muted); }

.user-name {
    font-size: 14px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

/* Chat Main Area */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    min-width: 0;
}

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

.chat-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-menu {
    display: none;
}

.chat-avatar {
    width: 44px;
    height: 44px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--accent-primary);
}

.chat-details h2 {
    font-size: 16px;
    font-weight: 600;
}

.chat-details span {
    font-size: 13px;
    color: var(--text-muted);
}

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

/* Messages Container */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.messages-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
}

.welcome-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.welcome-message i {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.welcome-message h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

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

.message.own {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    overflow: hidden;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-content {
    max-width: 70%;
}

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

.message.own .message-header {
    flex-direction: row-reverse;
}

.message-author {
    font-weight: 600;
    font-size: 14px;
    color: var(--accent-secondary);
}

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

.message-bubble {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: var(--border-radius);
    border-top-left-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.message.own .message-bubble {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: 4px;
}

/* Message Input */
.message-input-container {
    padding: 20px 24px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(18, 18, 26, 0.98) 100%);
    border-top: 1px solid var(--border-color);
    position: relative;
}

.message-input-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    opacity: 0.3;
}

.message-form {
    display: flex;
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
}

.input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 6px 12px;
    transition: all var(--transition-fast);
}

.input-wrapper:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
    background: rgba(26, 26, 37, 0.8);
}

.input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 12px 8px;
    font-size: 15px;
}

.input-wrapper input:focus {
    outline: none;
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.input-wrapper .btn-icon {
    width: 38px;
    height: 38px;
    color: var(--text-muted);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.input-wrapper .btn-icon:hover {
    color: var(--accent-primary);
    background: rgba(139, 92, 246, 0.1);
}

#send-btn {
    width: 54px;
    height: 54px;
    border-radius: var(--border-radius-lg);
    font-size: 18px;
    transition: all var(--transition-fast);
}

#send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.4);
}

#send-btn:active {
    transform: scale(0.95);
}

/* Emoji Picker */
.emoji-picker {
    position: absolute;
    bottom: 80px;
    left: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 50;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
}

.emoji {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    transition: background var(--transition-fast);
}

.emoji:hover {
    background: var(--bg-hover);
}

/* ===== Profile Page ===== */
.profile-page {
    padding-top: 80px;
}

.profile-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.profile-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-header-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.profile-banner {
    height: 120px;
    background: var(--gradient-primary);
    position: relative;
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.3));
}

.profile-header-content {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    padding: 0 30px 30px;
    margin-top: -50px;
    position: relative;
}

.profile-avatar-wrapper {
    position: relative;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    background: var(--bg-tertiary);
    border: 4px solid var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--text-muted);
    overflow: hidden;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    background: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.avatar-upload-btn:hover {
    transform: scale(1.1);
}

.avatar-upload-btn i {
    font-size: 14px;
    color: white;
}

.profile-header-info {
    flex: 1;
    padding-bottom: 10px;
}

.profile-header-info h1 {
    font-size: 24px;
    margin-bottom: 4px;
}

.profile-header-info p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.profile-joined {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

/* Profile Stats */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: var(--accent-glow);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--accent-primary);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* Profile Settings Card */
.profile-settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 30px;
}

.card-header {
    margin-bottom: 24px;
}

.card-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
}

.card-header h2 i {
    color: var(--accent-primary);
}

.danger-zone {
    border-color: rgba(239, 68, 68, 0.3);
}

.danger-zone .card-header h2 i {
    color: var(--danger);
}

.danger-text {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ===== Modals ===== */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h2 {
    font-size: 18px;
}

.modal-body {
    padding: 24px;
}

.modal-body p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

#create-room-form {
    padding: 24px;
}

#create-room-form .form-group {
    margin-bottom: 20px;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        padding: 100px 40px 60px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 42px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .features {
        padding: 60px 40px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 12px 20px;
    }
    
    .hero {
        padding: 80px 20px 40px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .features {
        padding: 40px 20px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .auth-container {
        flex-direction: column;
    }
    
    .auth-visual {
        display: none;
    }
    
    .auth-card {
        padding: 30px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Chat responsive */
    .chat-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 150;
        transform: translateX(-100%);
    }
    
    .chat-sidebar.open {
        transform: translateX(0);
    }
    
    .mobile-menu {
        display: flex;
    }
    
    .messages-container {
        padding: 16px;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    /* Profile responsive */
    .profile-stats {
        grid-template-columns: 1fr;
    }
    
    .profile-header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0 20px 20px;
    }
    
    .profile-settings-card {
        padding: 20px;
    }
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.message {
    animation: fadeIn 0.3s ease;
}

.room-item, .user-item {
    animation: slideIn 0.2s ease;
}

/* ===== Loading States ===== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--border-radius-sm);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: bounce 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

/* ===== Enhanced Landing Page ===== */

/* Particles Background */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: float-particle 15s infinite;
}

@keyframes float-particle {
    0%, 100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Enhanced Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 40px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    padding: 12px 40px;
    background: rgba(10, 10, 15, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.brand-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-icon i {
    font-size: 28px;
    color: var(--accent-primary);
    z-index: 1;
    transition: transform var(--transition-normal);
}

.nav-brand:hover .brand-icon i {
    transform: scale(1.1) rotate(-10deg);
}

.brand-glow {
    position: absolute;
    width: 40px;
    height: 40px;
    background: var(--accent-primary);
    border-radius: 50%;
    filter: blur(15px);
    opacity: 0.4;
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.2); opacity: 0.6; }
}

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

.nav-link {
    padding: 10px 20px;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: transform var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after,
.nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-glow:hover::before {
    left: 100%;
}

/* Hamburger Menu */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 101;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
    transition: all var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-fast);
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

.nav-toggle.active .hamburger {
    background: transparent;
}

.nav-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle.active .hamburger::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* Mobile Sidebar */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    pointer-events: none;
    visibility: hidden;
}

.mobile-sidebar.open {
    pointer-events: all;
    visibility: visible;
}

.sidebar-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.mobile-sidebar.open .sidebar-backdrop {
    opacity: 1;
}

.mobile-sidebar .sidebar-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 85%;
    height: 100%;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-sidebar.open .sidebar-content {
    transform: translateX(0);
}

.mobile-sidebar .sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
}

.sidebar-brand i {
    color: var(--accent-primary);
}

.sidebar-close {
    background: var(--bg-tertiary);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.sidebar-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-nav {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: var(--text-secondary);
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.sidebar-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--gradient-primary);
    transform: scaleY(0);
    transition: transform var(--transition-fast);
}

.sidebar-link:hover,
.sidebar-link.active {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-link.active::before {
    transform: scaleY(1);
}

.sidebar-link i {
    width: 20px;
    text-align: center;
}

.mobile-sidebar .sidebar-actions {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid var(--border-color);
}

.mobile-sidebar .sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
}

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

/* Enhanced Hero Section */
.hero {
    position: relative;
    z-index: 1;
}

.hero-content {
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    animation: fadeInUp 0.8s ease 0.1s both;
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
    animation: fadeInUp 0.8s ease 0.3s both;
}

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

.hero-visual {
    animation: fadeInRight 0.8s ease 0.4s both;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Enhanced Chat Preview */
.chat-preview {
    position: relative;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: perspective(1000px) rotateY(-5deg) rotateX(2deg) translateY(0); }
    50% { transform: perspective(1000px) rotateY(-5deg) rotateX(2deg) translateY(-10px); }
}

.chat-preview:hover {
    animation-play-state: paused;
}

.chat-preview::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--gradient-primary);
    border-radius: calc(var(--border-radius-lg) + 2px);
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.chat-preview:hover::before {
    opacity: 0.5;
}

.preview-msg {
    opacity: 0;
    animation: messageSlide 0.4s ease forwards;
}

.preview-msg:nth-child(1) { animation-delay: 0.5s; }
.preview-msg:nth-child(2) { animation-delay: 0.8s; }
.preview-msg:nth-child(3) { animation-delay: 1.1s; }

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

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--accent-glow);
    border: 1px solid var(--accent-primary);
    border-radius: var(--border-radius-full);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-secondary);
    margin-bottom: 16px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 18px;
    max-width: 600px;
    margin: 16px auto 0;
}

/* Enhanced Feature Cards */
.feature-card {
    position: relative;
    overflow: hidden;
}

.feature-icon-wrapper {
    position: relative;
    width: 70px;
    height: 70px;
    margin: 0 auto 24px;
}

.feature-icon {
    position: relative;
    z-index: 1;
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    transition: transform var(--transition-normal);
}

.feature-icon-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    border-radius: var(--border-radius);
    filter: blur(20px);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(-5deg);
}

.feature-card:hover .feature-icon-bg {
    opacity: 0.5;
}

.feature-hover-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-normal);
}

.feature-card:hover .feature-hover-line {
    transform: scaleX(1);
}

/* Stats Section */
.stats-section {
    padding: 80px 40px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 48px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* About Section */
.about-section {
    padding: 100px 80px;
    background: var(--bg-primary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.about-text .section-title {
    text-align: left;
    margin-bottom: 20px;
}

.about-text p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 30px;
}

.about-features {
    list-style: none;
    margin-bottom: 30px;
}

.about-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    color: var(--text-secondary);
}

.about-features li i {
    color: var(--success);
    font-size: 18px;
}

.about-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-cards {
    position: relative;
    width: 300px;
    height: 300px;
}

.floating-card {
    position: absolute;
    width: 100px;
    height: 100px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--accent-primary);
    box-shadow: var(--shadow-lg);
    animation: floatCard 4s ease-in-out infinite;
}

.floating-card.card-1 {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0s;
}

.floating-card.card-2 {
    bottom: 20%;
    left: 10%;
    animation-delay: 0.5s;
}

.floating-card.card-3 {
    bottom: 20%;
    right: 10%;
    animation-delay: 1s;
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.floating-card.card-1 {
    animation-name: floatCard1;
}

@keyframes floatCard1 {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-15px); }
}

/* Community Section */
.community-section {
    padding: 100px 80px;
    background: var(--bg-secondary);
}

.community-cta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.cta-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 40px 30px;
    text-align: center;
    transition: all var(--transition-normal);
    position: relative;
}

.cta-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
}

.cta-card.featured {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

.cta-card.featured:hover {
    transform: scale(1.05) translateY(-8px);
}

.cta-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 16px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius-full);
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.cta-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--accent-primary);
    margin: 0 auto 20px;
    transition: all var(--transition-normal);
}

.cta-card:hover .cta-icon {
    background: var(--gradient-primary);
    color: white;
}

.cta-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.cta-card p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

/* Enhanced Footer */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 0;
}

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

.footer-main {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    padding: 60px 40px;
}

.footer-brand-section .footer-brand {
    justify-content: flex-start;
    margin-bottom: 16px;
}

.footer-tagline {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.social-btn:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-3px);
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

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

.footer-column a {
    display: block;
    color: var(--text-secondary);
    font-size: 14px;
    padding: 6px 0;
    transition: all var(--transition-fast);
}

.footer-column a:hover {
    color: var(--accent-primary);
    transform: translateX(4px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 40px;
    border-top: 1px solid var(--border-color);
}

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

.made-with i {
    color: var(--danger);
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Responsive Enhancements */
@media (max-width: 1024px) {
    .nav-center {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-text .section-title {
        text-align: center;
    }
    
    .about-text {
        text-align: center;
    }
    
    .about-features {
        display: inline-block;
        text-align: left;
    }
    
    .community-cta {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    
    .cta-card.featured {
        transform: none;
        order: -1;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .stat-number {
        font-size: 36px;
    }
    
    .about-section,
    .community-section {
        padding: 60px 20px;
    }
    
    .floating-cards {
        width: 200px;
        height: 200px;
    }
    
    .floating-card {
        width: 70px;
        height: 70px;
        font-size: 24px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* ===== Loading & Page Transitions ===== */
.page-loader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    position: relative;
}

.loader-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

/* Button Loading State */
.btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn.loading .btn-text {
    visibility: hidden;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Skeleton Loading */
.skeleton-text {
    height: 14px;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-card {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--border-radius);
    height: 100px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    animation: toast-in 0.3s ease;
    max-width: 350px;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.info {
    border-left: 4px solid var(--info);
}

.toast-icon {
    font-size: 20px;
}

.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }
.toast.info .toast-icon { color: var(--info); }

.toast-message {
    flex: 1;
    font-size: 14px;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition-fast);
}

.toast-close:hover {
    color: var(--text-primary);
}

@keyframes toast-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.removing {
    animation: toast-out 0.3s ease forwards;
}

@keyframes toast-out {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Ripple Effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 50%;
    left: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 60%);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
}

.btn-ripple:active::after {
    transform: translate(-50%, -50%) scale(2);
    opacity: 1;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

/* Focus Styles */
*:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}

/* Selection */
::selection {
    background: var(--accent-primary);
    color: white;
}

/* Tooltip */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: 100;
    pointer-events: none;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* Smooth page transitions */
.fade-enter {
    opacity: 0;
    transform: translateY(10px);
}

.fade-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

/* ===== Modal Styles ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: modal-bg-in 0.3s ease;
}

@keyframes modal-bg-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.email-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    animation: modal-in 0.3s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.email-modal-content .modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    animation: pulse-glow 2s infinite;
}

.email-modal-content h2 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.email-modal-content p {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.modal-email {
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-primary) !important;
    margin-bottom: 16px !important;
}

.modal-hint {
    font-size: 13px;
    color: var(--text-muted) !important;
    margin-bottom: 24px !important;
}

.email-modal-content .btn {
    margin-top: 8px;
}