/* ============================
   MULTIFUNC - DUAL THEME STYLES
   Steam (Dark) & Apple (Light)
   ============================ */

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

html {
    scroll-behavior: smooth;
}

/* ----- Theme Variables ----- */

/* Steam Theme (Dark - Default) */
[data-theme="steam"] {
    --bg-primary: #0a0f1a;
    --bg-secondary: #111827;
    --bg-tertiary: #1a2332;
    --bg-card: rgba(26, 35, 50, 0.8);
    --bg-card-hover: rgba(36, 49, 70, 0.9);
    --bg-navbar: rgba(10, 15, 26, 0.95);
    --bg-dropdown: #1a2332;
    --bg-input: rgba(17, 24, 39, 0.8);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #38bdf8;
    
    --accent-primary: #06b6d4;
    --accent-secondary: #22d3ee;
    --accent-gradient: linear-gradient(135deg, #06b6d4 0%, #22d3ee 50%, #67e8f9 100%);
    --accent-glow: rgba(6, 182, 212, 0.3);
    --reply-highlight-bg: rgba(255, 255, 255, 0.08);
    --reply-highlight-hover: rgba(255, 255, 255, 0.15);
    --reply-highlight-own-bg: rgba(255, 255, 255, 0.2);
    --reply-highlight-own-hover: rgba(255, 255, 255, 0.32);
    
    --border-color: rgba(148, 163, 184, 0.1);
    --border-hover: rgba(6, 182, 212, 0.3);
    
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(6, 182, 212, 0.15);
    
    --font-primary: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    --glow-1-color: rgba(6, 182, 212, 0.08);
    --glow-2-color: rgba(139, 92, 246, 0.06);
    
    --btn-primary-bg: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    --btn-primary-hover: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
    --btn-secondary-bg: transparent;
    --btn-secondary-border: var(--accent-primary);
}

/* Apple Theme (Light) */
[data-theme="apple"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-tertiary: #e8e8ed;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-navbar: rgba(255, 255, 255, 0.85);
    --bg-dropdown: #ffffff;
    --bg-input: rgba(245, 245, 247, 0.8);
    
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-muted: #86868b;
    --text-accent: #0071e3;
    
    --accent-primary: #0071e3;
    --accent-secondary: #147ce5;
    --accent-gradient: linear-gradient(135deg, #0071e3 0%, #42a1ec 100%);
    --accent-glow: rgba(0, 113, 227, 0.15);
    --reply-highlight-bg: rgba(0, 0, 0, 0.06);
    --reply-highlight-hover: rgba(0, 0, 0, 0.12);
    --reply-highlight-own-bg: rgba(255, 255, 255, 0.8);
    --reply-highlight-own-hover: rgba(255, 255, 255, 0.92);
    
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 113, 227, 0.3);
    
    --success-color: #34c759;
    --error-color: #ff3b30;
    --warning-color: #ff9500;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 40px rgba(0, 113, 227, 0.08);
    
    --font-primary: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    --font-mono: 'SF Mono', 'JetBrains Mono', monospace;
    
    --glow-1-color: rgba(0, 113, 227, 0.04);
    --glow-2-color: rgba(175, 82, 222, 0.03);
    
    --btn-primary-bg: linear-gradient(135deg, #0071e3 0%, #147ce5 100%);
    --btn-primary-hover: linear-gradient(135deg, #147ce5 0%, #2997ff 100%);
    --btn-secondary-bg: transparent;
    --btn-secondary-border: var(--accent-primary);
}

/* ----- Body & Typography ----- */
body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.4s ease, color 0.4s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ----- Navbar ----- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-navbar);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
    transition: opacity 0.2s ease;
}

.navbar-brand:hover {
    opacity: 0.8;
}

.brand-icon {
    font-size: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.2s ease;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ----- Nav Link with Notification ----- */
.nav-link-chat {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ----- Account Dropdown ----- */
.navbar-account {
    position: relative;
}

.account-dropdown {
    position: relative;
}

.account-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-primary);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.account-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.account-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.dropdown-arrow {
    transition: transform 0.2s ease;
}

.account-dropdown:hover .dropdown-arrow,
.account-dropdown:focus-within .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 220px;
    background: var(--bg-dropdown);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.account-dropdown:hover .dropdown-menu,
.account-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.15s ease;
    border: none;
    background: transparent;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.dropdown-item:hover {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
}

.dropdown-item svg {
    color: var(--text-secondary);
    transition: color 0.15s ease;
}

.dropdown-item:hover svg {
    color: var(--accent-primary);
}

.dropdown-item-danger:hover {
    color: var(--error-color);
}

.dropdown-item-danger:hover svg {
    color: var(--error-color);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

.logout-form {
    display: contents;
}

/* ----- Main Content ----- */
.main-content {
    flex: 1;
    padding-top: 64px;
}

/* ----- Hero Section ----- */
.hero-section {
    position: relative;
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    overflow: hidden;
}

.hero-bg-effects {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
}

.glow-orb-1 {
    width: 600px;
    height: 600px;
    top: -200px;
    right: -100px;
    background: var(--glow-1-color);
}

.glow-orb-2 {
    width: 500px;
    height: 500px;
    bottom: -150px;
    left: -100px;
    background: var(--glow-2-color);
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    width: 100%;
}

.welcome-card,
.success-card {
    text-align: center;
    padding: 3rem;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.lock-icon,
.success-icon {
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.success-icon {
    color: var(--success-color);
}

.success-icon svg {
    stroke: var(--success-color);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ----- Buttons ----- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    border: none;
}

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

.btn-primary:hover {
    background: var(--btn-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 30px var(--accent-glow);
}

.btn-secondary {
    background: var(--btn-secondary-bg);
    color: var(--accent-primary);
    border: 2px solid var(--btn-secondary-border);
}

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

.btn-full {
    width: 100%;
}

/* ----- Features Preview ----- */
.features-preview {
    margin-top: 4rem;
    text-align: center;
}

.features-title {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 500;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    padding: 2rem 1.5rem;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}

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

a.feature-card {
    cursor: pointer;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

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

/* ----- Auth Pages ----- */
.auth-page {
    position: relative;
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    overflow: hidden;
}

.auth-bg-effects {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    padding: 3rem;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

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

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

.form-error {
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    color: var(--error-color);
    font-size: 0.9375rem;
    text-align: center;
}

.field-error {
    font-size: 0.875rem;
    color: var(--error-color);
}

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

.auth-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.auth-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ----- Account Page ----- */
.account-page {
    position: relative;
    min-height: calc(100vh - 64px);
    padding: 4rem 2rem;
    overflow: hidden;
}

.account-bg-effects {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.account-container {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.account-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.account-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

.account-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.account-email {
    color: var(--text-secondary);
}

.settings-section {
    padding: 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.section-title svg {
    color: var(--accent-primary);
}

.section-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ----- Theme Selector ----- */
.theme-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.theme-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.theme-option {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.theme-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.theme-option:hover {
    border-color: var(--border-hover);
}

.theme-option.active {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.theme-preview {
    height: 100px;
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
    position: relative;
}

.theme-preview-steam {
    background: linear-gradient(135deg, #0a0f1a 0%, #1a2332 100%);
}

.theme-preview-steam .preview-nav {
    height: 20px;
    background: rgba(6, 182, 212, 0.2);
    border-bottom: 1px solid rgba(6, 182, 212, 0.3);
}

.theme-preview-steam .preview-card {
    position: absolute;
    top: 30px;
    left: 10px;
    width: 60px;
    height: 50px;
    background: rgba(6, 182, 212, 0.15);
    border-radius: 6px;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.theme-preview-steam .preview-text {
    position: absolute;
    top: 35px;
    left: 80px;
    right: 10px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.theme-preview-apple {
    background: linear-gradient(135deg, #f5f5f7 0%, #ffffff 100%);
}

.theme-preview-apple .preview-nav {
    height: 20px;
    background: rgba(0, 113, 227, 0.1);
    border-bottom: 1px solid rgba(0, 113, 227, 0.2);
}

.theme-preview-apple .preview-card {
    position: absolute;
    top: 30px;
    left: 10px;
    width: 60px;
    height: 50px;
    background: rgba(0, 113, 227, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(0, 113, 227, 0.2);
}

.theme-preview-apple .preview-text {
    position: absolute;
    top: 35px;
    left: 80px;
    right: 10px;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.theme-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.theme-name {
    font-weight: 600;
    color: var(--text-primary);
}

.theme-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.theme-check {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.25s ease;
}

.theme-option.active .theme-check {
    opacity: 1;
    transform: scale(1);
}

/* ----- Info Grid ----- */
.info-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
}

.info-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.info-value {
    color: var(--text-primary);
    font-weight: 600;
}

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

.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

.delay-1 {
    animation-delay: 0.15s;
    opacity: 0;
}

.delay-2 {
    animation-delay: 0.3s;
    opacity: 0;
}

/* ============================
   MOBILE NAVIGATION
   ============================ */

/* ----- Mobile Menu Toggle (Hamburger) ----- */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ----- Mobile Nav Overlay ----- */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    display: block;
    opacity: 1;
}

/* ----- Mobile Nav Drawer ----- */
.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100vh;
    height: 100dvh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    z-index: 1200;
    flex-direction: column;
    overflow-y: auto;
    /* Hidden by default - use transform for better performance */
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0.3s ease;
}

.mobile-nav-drawer.active {
    transform: translateX(0);
    visibility: visible;
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-navbar);
    position: sticky;
    top: 0;
}

.mobile-nav-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.mobile-nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

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

.mobile-nav-links {
    flex: 1;
    padding: 1rem 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
}

.mobile-nav-link svg {
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.mobile-nav-link:hover svg,
.mobile-nav-link:focus svg {
    color: var(--accent-primary);
}

.mobile-nav-link-chat {
    position: relative;
}

.mobile-notification-badge {
    margin-left: auto;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.75rem 1.25rem;
}

.mobile-nav-section-title {
    display: block;
    padding: 0.5rem 1.25rem 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.mobile-nav-footer {
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
}

.mobile-nav-link-danger {
    color: var(--error-color);
}

.mobile-nav-link-danger svg {
    color: var(--error-color);
}

.mobile-logout-form {
    display: contents;
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
    .navbar-container {
        padding: 0 1rem;
    }
    
    .navbar-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
        order: 2;
        margin-left: 0.5rem;
    }
    
    .mobile-nav-drawer {
        display: flex;
    }
    
    .navbar-account {
        order: 1;
    }
    
    .account-text {
        display: none;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .welcome-card,
    .success-card,
    .auth-container {
        padding: 2rem 1.5rem;
    }
    
    .account-header {
        flex-direction: column;
        text-align: center;
    }
    
    .theme-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* ----- Admin Pages ----- */
.admin-page {
    position: relative;
    min-height: calc(100vh - 64px);
    padding: 4rem 2rem;
    overflow: hidden;
}

.admin-bg-effects {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.admin-container {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.admin-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.admin-header-content {
    flex: 1;
}

.admin-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--accent-primary);
}

.admin-card {
    padding: 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

/* ----- Forms ----- */
.inline-form {
    width: 100%;
}

.inline-form-fields {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.stacked-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.stacked-form .btn {
    align-self: flex-start;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

.form-input-simple {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

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

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

textarea.form-input {
    padding: 0.875rem 1rem;
    min-height: 80px;
    resize: vertical;
}

select.form-input {
    padding: 0.875rem 1rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ----- Items List ----- */
.items-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.list-item-link {
    text-decoration: none;
    cursor: pointer;
}

.list-item-link:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.item-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.item-primary {
    font-weight: 600;
    color: var(--text-primary);
}

.item-secondary {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.item-info > .item-secondary {
    margin-left: -0.5rem;
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.item-date {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.member-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    background: var(--bg-input);
    border-radius: 20px;
}

.member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.member-details {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.member-details .item-primary,
.member-details .item-secondary {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ----- Buttons ----- */
.btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    transform: translateY(-2px);
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-icon.btn-danger {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.btn-icon.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error-color);
    color: var(--error-color);
}

.inline-delete {
    display: contents;
}

/* ----- Alerts ----- */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success-color);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error-color);
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ----- Admin Responsive ----- */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .admin-header .btn {
        align-self: flex-start;
    }
    
    .inline-form-fields {
        flex-direction: column;
    }
    
    .inline-form-fields .btn {
        width: 100%;
    }
    
    .list-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .item-meta {
        justify-content: space-between;
    }
}

/* ============================
   SECRET SANTA STYLES
   ============================ */

/* ----- Nav Icon ----- */
.nav-icon {
    font-size: 1rem;
    margin-right: 0.25rem;
}

/* ----- Page Layout ----- */
.secretsanta-page {
    position: relative;
    min-height: calc(100vh - 64px);
    padding: 4rem 2rem;
    overflow: hidden;
}

.secretsanta-container,
.event-detail-container,
.group-detail-container,
.form-page-container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

/* ----- Page Header ----- */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.header-content {
    flex: 1;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.title-icon {
    font-size: 2.5rem;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ----- Events Grid ----- */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.event-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.event-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.event-icon {
    font-size: 3rem;
    line-height: 1;
}

.event-info {
    flex: 1;
}

.event-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.event-budget {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--accent-glow);
    color: var(--accent-primary);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-right: 0.5rem;
}

.event-date {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.event-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.event-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.status-ready {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
}

.status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
}

/* ----- Empty State ----- */
.empty-state-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 4rem 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    text-align: center;
    margin-bottom: 2rem;
}

.empty-icon {
    font-size: 4rem;
    opacity: 0.8;
}

.empty-state-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.empty-state-card p {
    color: var(--text-secondary);
    max-width: 300px;
}

/* ----- Quick Links ----- */
.quick-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quick-link-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.quick-link-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.quick-link-icon {
    font-size: 2rem;
}

.quick-link-content {
    flex: 1;
}

.quick-link-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.quick-link-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.quick-link-card svg {
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.quick-link-card:hover svg {
    transform: translateX(4px);
    color: var(--accent-primary);
}

/* ----- Form Pages ----- */
.form-card {
    padding: 2.5rem;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-help {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.form-note {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 1.5rem;
}

/* ----- Groups Checkbox ----- */
.groups-section {
    margin-top: 0.5rem;
}

.groups-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.group-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.group-checkbox-item:hover {
    background: var(--bg-card-hover);
}

.group-checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.group-checkbox-label {
    font-weight: 500;
    color: var(--text-primary);
}

.empty-groups-notice {
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    text-align: center;
    color: var(--text-secondary);
}

.empty-groups-notice a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
}

.empty-groups-notice a:hover {
    text-decoration: underline;
}

/* ----- Event Detail ----- */
.event-header-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.event-header-icon {
    font-size: 4rem;
    line-height: 1;
}

.event-header-info {
    flex: 1;
}

.event-header-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.event-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.meta-item svg {
    opacity: 0.7;
}

/* ----- Assignment Card ----- */
.assignment-card {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.assignment-card.pending {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(234, 179, 8, 0.1) 100%);
    border-color: rgba(245, 158, 11, 0.3);
}

.assignment-header {
    margin-bottom: 1.5rem;
}

.assignment-label {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.assignment-reveal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.reveal-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    box-shadow: var(--shadow-lg);
}

.reveal-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.reveal-email {
    font-size: 1rem;
    color: var(--text-secondary);
}

.assignment-note {
    font-size: 0.9375rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ----- Info Card ----- */
.info-card {
    padding: 1.5rem;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.info-card-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.info-card-title svg {
    color: var(--accent-primary);
}

.info-card-content {
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-line;
}

/* ----- Participants List ----- */
.participants-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.participant-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem 0.5rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 30px;
}

.participant-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
}

.participant-name {
    font-weight: 500;
    color: var(--text-primary);
}

.participant-badge {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    background: var(--accent-glow);
    color: var(--accent-primary);
    border-radius: 10px;
    font-weight: 600;
}

/* ----- Admin Actions ----- */
.admin-actions-card {
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.admin-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.inline-form {
    display: contents;
}

/* ----- Groups List ----- */
.groups-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.group-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.group-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateX(4px);
}

.group-card-icon {
    font-size: 2rem;
}

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

.group-card-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.group-card-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.group-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.owner-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.2) 0%, rgba(245, 158, 11, 0.2) 100%);
    color: var(--warning-color);
    border-radius: 10px;
    font-weight: 600;
}

.group-card-arrow {
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.group-card:hover .group-card-arrow {
    transform: translateX(4px);
    color: var(--accent-primary);
}

/* ----- Group Detail ----- */
.group-header-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.group-header-icon {
    font-size: 3rem;
}

.group-header-info {
    flex: 1;
}

.group-header-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.group-header-desc {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.group-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.leave-form {
    flex-shrink: 0;
}

/* ----- Members List ----- */
.members-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
}

.member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    flex-shrink: 0;
}

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

.member-name {
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.member-email {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: block;
}

.member-badges {
    display: flex;
    gap: 0.5rem;
}

/* ----- Add Member Form ----- */
.add-member-form {
    margin-top: 0.5rem;
}

.add-member-form .form-help {
    margin-top: 0.75rem;
    font-style: italic;
}

.transfer-form {
    margin-top: 0.5rem;
}

/* ----- Group Actions Card ----- */
.group-actions-card {
    margin-bottom: 1.5rem;
}

.members-hint {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: auto;
}

.you-badge {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ----- User DM Link ----- */
.user-dm-link {
    display: inline-flex;
    align-items: center;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.user-dm-link:hover {
    color: var(--accent-primary);
}

.user-dm-link svg {
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.2s ease;
}

.user-dm-link:hover svg {
    opacity: 1;
    transform: translateX(0);
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
    .secretsanta-page {
        padding: 2rem 1rem;
    }
    
    .page-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .page-header .btn {
        width: 100%;
    }
    
    .events-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .event-header-card,
    .group-header-card {
        flex-direction: column;
        text-align: center;
    }
    
    .event-header-meta,
    .group-header-meta {
        justify-content: center;
    }
    
    .admin-buttons {
        flex-direction: column;
    }
    
    .admin-buttons .btn {
        width: 100%;
    }
    
    .inline-form-fields {
        flex-direction: column;
    }
    
    .inline-form-fields .btn {
        width: 100%;
    }
    
    .participants-list {
        justify-content: center;
    }
}

/* ============================
   ACTIVITY SECTION (Account Page)
   ============================ */

.activity-subsection {
    margin-bottom: 1.5rem;
}

.activity-subsection:last-child {
    margin-bottom: 0;
}

.subsection-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.activity-item:hover {
    background: var(--bg-card-hover);
    transform: translateX(4px);
}

.activity-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.activity-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.activity-event {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.activity-detail {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.activity-detail strong {
    color: var(--accent-primary);
}

.activity-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.badge-ready {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
}

.badge-pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
}

.activity-arrow {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.activity-item:hover .activity-arrow {
    transform: translateX(4px);
    color: var(--accent-primary);
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 1rem;
    padding: 0.5rem 0;
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.view-all-link:hover {
    opacity: 0.8;
}

.view-all-link svg {
    transition: transform 0.2s ease;
}

.view-all-link:hover svg {
    transform: translateX(4px);
}

@media (max-width: 768px) {
    .activity-item {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .activity-info {
        flex-basis: calc(100% - 4rem);
    }
    
    .activity-badge {
        margin-left: auto;
    }
}

