:root {
    /* Primary – Deep blue/navy (logo start) */
    --primary: #1E40AF;
    --primary-dark: #1E3A8A;
    --primary-light: #60A5FA;
    --primary-50: #EFF6FF;
    --primary-100: #DBEAFE;
    --primary-900: #1E3A8A;

    /* Accent – Cyan (middle gradient energy) */
    --accent: #06B6D4;
    --accent-dark: #0891B2;
    --accent-light: #22D3EE;
    --accent-50: #ECFEFF;

    /* Secondary – Warm orange (logo end – CTAs, highlights) */
    --secondary: #F97316;
    --secondary-dark: #EA580C;
    --secondary-light: #FB923C;
    --secondary-50: #FFF7ED;

    /* Backgrounds & Surfaces */
    --background: #F9FAFB;
    --surface: #FFFFFF;
    --surface-elevated: #FFFFFF;
    --surface-hover: #F3F4F6;

    /* Text colors */
    --text: #111827;
    --text-secondary: #6B7280;
    --text-tertiary: #9CA3AF;

    /* Status colors */
    --success: #10B981;
    --error: #EF4444;
    --info: #1E40AF;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Border radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Font variables */
    --font-heading: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-display: 'Space Grotesk', system-ui, sans-serif;

    /* Font weights */
    --font-thin: 100;
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;
    --font-black: 900;

    /* Letter spacing & line heights */
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    --tracking-widest: 0.1em;

    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;
}

/* Dark Mode */
.dark {
    --primary: #60A5FA;
    --primary-dark: #3B82F6;
    --primary-light: #93C5FD;
    --primary-50: #1E3A8A;
    --primary-100: #1E40AF;
    --primary-900: #DBEAFE;

    --accent: #22D3EE;
    --accent-dark: #06B6D4;
    --accent-light: #67E8F9;
    --accent-50: #164E63;

    --secondary: #FB923C;
    --secondary-dark: #F97316;
    --secondary-light: #FDBA74;
    --secondary-50: #431407;

    --background: #0F172A;
    --surface: #1E293B;
    --surface-elevated: #334155;
    --surface-hover: #475569;

    --text: #F9FAFB;
    --text-secondary: #D1D5DB;
    --text-tertiary: #9CA3AF;

    --success: #34D399;
    --error: #F87171;
    --info: #60A5FA;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.5), 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 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.3);
}

/* Reduced Motion */
.no-animations *,
.no-animations *::before,
.no-animations *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}

/* Reduced Motion */
.no-animations *,
.no-animations *::before,
.no-animations *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    background-color: var(--background);
    color: var(--text);
    font-family: var(--font-body);
    font-weight: var(--font-normal);
    line-height: var(--leading-relaxed);
    letter-spacing: var(--tracking-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    transition: background-color var(--transition), color var(--transition);
    min-height: 100vh;
    text-decoration: none;
    margin-top: 110px !important;
    
}

/* ==========================================================================
   Typography
   ========================================================================== */
   h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    margin-bottom: 0.75em;
    text-wrap: balance;
}

h1 {
    font-size: 3.5rem;
    font-weight: var(--font-black);
    letter-spacing: var(--tracking-tight);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h2 {
    font-size: 2.5rem;
    font-weight: var(--font-bold);
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
    margin-top: 2rem;
}

h3 {
    font-size: 2rem;
    font-weight: var(--font-semibold);
    color: var(--text);
    margin-top: 1.5rem;
}

h4 {
    font-size: 1.5rem;
    font-weight: var(--font-semibold);
}

h5 {
    font-size: 1.25rem;
    font-weight: var(--font-medium);
}

h6 {
    font-size: 1rem;
    font-weight: var(--font-medium);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    color: var(--text-secondary);
}

p {
    font-family: var(--font-body);
    margin-bottom: 1.5rem;
    line-height: var(--leading-relaxed);
    font-size: 1.125rem;
    color: var(--text);
    max-width: 65ch;
}

.lead {
    font-size: 1.25rem;
    line-height: var(--leading-relaxed);
    color: var(--text-secondary);
    font-weight: var(--font-light);
}

.small {
    font-size: 0.875rem;
    line-height: var(--leading-tight);
    color: var(--text-tertiary);
}

.display-1 {
    font-family: var(--font-display);
    font-size: 4.5rem;
    font-weight: var(--font-black);
    line-height: 1;
    letter-spacing: var(--tracking-tight);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.display-2 {
    font-family: var(--font-display);
    font-size: 3.75rem;
    font-weight: var(--font-extrabold);
    line-height: 1.1;
    letter-spacing: var(--tracking-tight);
}

/* Code and monospace */
code, pre {
    font-family: var(--font-mono);
    font-size: 0.875em;
    font-weight: var(--font-medium);
}

pre {
    font-size: 0.9375em;
    line-height: var(--leading-snug);
    background: var(--surface-elevated);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    overflow-x: auto;
    border: 1px solid var(--border);
}

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

a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all var(--transition);
    animation: fadeIn 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}

.card:hover::before {
    opacity: 1;
}

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

.card-sm {
    padding: 1rem;
    border-radius: var(--radius);
}

.card-lg {
    padding: 2rem;
    border-radius: var(--radius-lg);
}

.card-elevated {
    background: var(--surface-elevated);
    border: none;
    box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-weight: var(--font-semibold);
    letter-spacing: var(--tracking-normal);
    font-size: 0.9375rem;
     border-radius: var(--radius);
    border: 1px solid transparent;
    padding: 0.625rem 1.25rem;
     line-height: 1.25rem;
    transition: all var(--transition);
    cursor: pointer;
    user-select: none;
    gap: 0.5rem;
    min-height: 44px;
    min-width: 44px;
}

.btn:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));color: white;
    border: none;
    
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-1px);
    color: white !important;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--primary);
    color: white !important;

}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    border: none;
}

.btn-accent:hover {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
    color: white !important;

}

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

.btn-outline:hover {
    background: var(--primary);
    color: white !important;

}

.btn-text {
    background: transparent;
    color: var(--primary);
    border: none;
    padding: 0.5rem;
}

.btn-text:hover {
    background: var(--primary-50);
    color: white !important;

}

.btn-icon {
    padding: 0.5rem;
    min-width: auto;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    min-height: 36px;
    min-width: 36px;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    min-height: 48px;
    min-width: 48px;
}

.btn-loading {
    position: relative;
    color: transparent;
}

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

/* ==========================================================================
   Forms
   ========================================================================== */

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
    font-size: 0.875rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid rgb(236, 236, 236);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.875rem;
    transition: all var(--transition);
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    background: var(--surface);
}

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

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.form-checkbox,
.form-radio {
    width: 1rem;
    height: 1rem;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    cursor: pointer;
}

.form-checkbox:checked,
.form-radio:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-checkbox:focus,
.form-radio:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-radio {
    border-radius: 50%;
}

.form-error {
    color: var(--error);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.form-error .form-input,
.form-error .form-textarea,
.form-error .form-select {
    border-color: var(--error);
}

.form-error .form-input:focus,
.form-error .form-textarea:focus,
.form-error .form-select:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
} 

/* ==========================================================================
   Posts & Comments
   ========================================================================== */

.post {
    animation: slideUp 0.3s ease-out;
    position: relative;
}

.post:hover {
    border-color: var(--primary);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.post-community {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.875rem;
}

.post-community:hover {
    text-decoration: underline;
}

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

.post-content {
    color: var(--text);
    line-height: 1.7;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content a {
    color: var(--primary);
    text-decoration: underline;
}

.post-content code {
    background: var(--surface-hover);
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
    font-family: 'Roboto Mono', monospace;
    font-size: 0.875em;
}

.post-content pre {
    background: var(--surface-elevated);
    padding: 1rem;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 1rem 0;
}

.post-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

/* Post Type Indicators */
.post-type-indicator {
    width: 4px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.post-type-analysis .post-type-indicator {
    background: var(--primary);
}

.post-type-tech .post-type-indicator {
    background: var(--secondary);
}

.post-type-stream .post-type-indicator {
    background: var(--accent);
}

.post-type-news .post-type-indicator {
    background: var(--warning);
}

.post-type-discussion .post-type-indicator {
    background: var(--text-tertiary);
}

/* ==========================================================================
   Voting System
   ========================================================================== */

.voting {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    gap: 0.25rem;
}

.vote-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    color: var(--text-tertiary);
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vote-btn:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.vote-btn.upvote:hover {
    color: var(--primary);
}

.vote-btn.downvote:hover {
    color: var(--error);
}

.vote-btn.active.upvote {
    color: var(--primary);
    background: var(--primary-50);
}

.vote-btn.active.downvote {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

.vote-score {
    font-weight: 600;
    font-size: 0.875rem;
    min-width: 2rem;
    text-align: center;
    color: var(--text);
}

/* ==========================================================================
   Comments
   ========================================================================== */

.comment {
    border-left: 2px solid var(--border);
    padding-left: 1rem;
    margin-left: 0.5rem;
    transition: border-color var(--transition);
    position: relative;
}

.comment:hover {
    border-left-color: var(--primary);
}

.comment-reply {
    margin-left: 2rem;
}

.comment-content {
    color: var(--text);
    line-height: 1.6;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.comment-action {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    transition: color var(--transition);
}

.comment-action:hover {
    color: var(--primary);
}

/* ==========================================================================
   Flairs & Badges
   ========================================================================== */

.flair {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.flair-analysis {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
}

.flair-tech {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
}

.flair-stream {
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    color: white;
}

.flair-news {
    background: linear-gradient(135deg, var(--success), var(--primary));
    color: white;
}

.flair-discussion {
    background: linear-gradient(135deg, var(--warning), var(--primary));
    color: white;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--surface-hover);
    color: var(--text-secondary);
    gap: 0.25rem;
}

.badge-primary {
    background: var(--primary-50);
    color: var(--primary);
}

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

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

.badge-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

/* ==========================================================================
   Modals & Overlays
   ========================================================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

.modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 32rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    animation: scaleIn 0.2s ease-out;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
}

.modal-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--border);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ==========================================================================
   Loading & Skeleton
   ========================================================================== */

.loading {
    animation: pulseSubtle 2s infinite;
}

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

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-sm);
}

.skeleton-circle {
    border-radius: 50%;
}

/* ==========================================================================
   Progress & Meters
   ========================================================================== */

.progress-bar {
    width: 100%;
    height: 0.5rem;
    background: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.progress-primary .progress-fill {
    background: var(--primary);
}

.progress-success .progress-fill {
    background: var(--success);
}

.progress-warning .progress-fill {
    background: var(--warning);
}

.progress-error .progress-fill {
    background: var(--error);
}

/* ==========================================================================
   Tooltips
   ========================================================================== */

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    background: var(--surface-elevated);
    color: var(--text);
    text-align: center;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.75rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    opacity: 0;
    transition: opacity var(--transition);
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--surface-elevated) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ==========================================================================
   Tags & Categories
   ========================================================================== */

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: all var(--transition);
    cursor: pointer;
    gap: 0.25rem;
}

.tag:hover {
    background: var(--surface);
    border-color: var(--primary);
    color: var(--primary);
}

.tag.selected {
    background: var(--primary-50);
    border-color: var(--primary);
    color: var(--primary);
}

.tag-close {
    padding: 0;
    min-width: auto;
    min-height: auto;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--text-tertiary);
    color: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
}

.tag-close:hover {
    background: var(--error);
}

/* ==========================================================================
   Lists
   ========================================================================== */

.list {
    list-style: none;
}

.list-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    transition: background-color var(--transition);
}

.list-item:hover {
    background: var(--surface-hover);
}

.list-item:last-child {
    border-bottom: none;
}

.list-header {
    padding: 1rem;
    background: var(--surface-hover);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    color: var(--text);
}

/* ==========================================================================
   Tables
   ========================================================================== */

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table th {
    background: var(--surface-hover);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.table tr:hover td {
    background: var(--surface-hover);
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   Avatars
   ========================================================================== */

.avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text);
    font-size: 0.875rem;
}

.avatar-sm {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.75rem;
}

.avatar-lg {
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
}

.avatar-xl {
    width: 4rem;
    height: 4rem;
    font-size: 1.5rem;
}

.avatar-initials {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
}

/* User Avatar (specific for GameDepth) */
.user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

/* ==========================================================================
   Media
   ========================================================================== */

.media-container {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface-hover);
}

.media-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition);
}

.media-image:hover {
    transform: scale(1.02);
}

.media-video {
    width: 100%;
    height: auto;
    display: block;
    background: black;
}

.media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    color: white;
}

/* Image optimization */
.blur-load {
    background-size: cover;
    background-position: center;
}

.blur-load.loaded > img {
    opacity: 1;
}

.blur-load > img {
    opacity: 0;
    transition: opacity 200ms ease-in-out;
}

/* Fullscreen modal */
#fullscreen-modal {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#fullscreen-modal img {
    max-height: 90vh;
    max-width: 90vw;
    object-fit: contain;
}

/* Progressive image loading */
.image-container {
    position: relative;
    overflow: hidden;
}

.image-container img {
    transition: opacity 0.3s ease;
}

.image-thumbnail {
    filter: blur(20px);
    transform: scale(1.1);
}

.image-full {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Aspect ratio containers */
.aspect-ratio-16-9 {
    aspect-ratio: 16 / 9;
}

.aspect-ratio-4-3 {
    aspect-ratio: 4 / 3;
}

.aspect-ratio-1-1 {
    aspect-ratio: 1 / 1;
}

.aspect-ratio-9-16 {
    aspect-ratio: 9 / 16;
}

.aspect-video { aspect-ratio: 16 / 9; }
.aspect-square { aspect-ratio: 1 / 1; }
.aspect-portrait { aspect-ratio: 9 / 16; }

/* ==========================================================================
   Search Results
   ========================================================================== */

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 24rem;
    overflow-y: auto;
    z-index: 40;
}

.search-result-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background-color var(--transition);
}

.search-result-item:hover {
    background: var(--surface-hover);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-type {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-tertiary);
    margin-bottom: 0.25rem;
}

.search-result-title {
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.125rem;
}

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

/* ==========================================================================
   Responsive Utilities
   ========================================================================== */

.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }
    
    .desktop-only {
        display: none;
    }
    
    .card {
        padding: 1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin-left: -1rem;
        margin-right: -1rem;
        width: calc(100% + 2rem);
    }
    
    .comment-reply {
        margin-left: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
}

/* Grid utilities */
.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 1rem;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

.focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.focus-ring {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ==========================================================================
   Scrollbar Styling
   ========================================================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
    border-radius: var(--radius-full);
}

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

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

.dark ::-webkit-scrollbar-track {
    background: var(--surface);
}

.dark ::-webkit-scrollbar-thumb {
    background: var(--border-dark);
}

/* ==========================================================================
   Selection Styling
   ========================================================================== */

::selection {
    background: var(--primary-50);
    color: var(--primary-900);
}

.dark ::selection {
    background: var(--primary-100);
    color: white;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
    
    .btn {
        display: none;
    }
}

/* ==========================================================================
   Custom Animations
   ========================================================================== */

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

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulseSubtle {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

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

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

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

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-4 {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.break-words {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }

/* Hover effects */
.hover-lift {
    transition: transform var(--transition);
}

.hover-lift:hover {
    transform: translateY(-2px);
}

.pulse {
    animation: pulse 2s infinite;
}

/* Ripple effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.ripple:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

/* ==========================================================================
   Color Mode Transition
   ========================================================================== */

.color-mode-transition {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* ==========================================================================
   Glass Effect
   ========================================================================== */

.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .glass {
    background: rgba(31, 41, 55, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Gradient Borders
   ========================================================================== */

.border-gradient {
    border: 2px solid transparent;
    background: 
        linear-gradient(var(--surface), var(--surface)) padding-box,
        linear-gradient(135deg, var(--primary), var(--accent)) border-box;
    border-radius: var(--radius);
}

/* ==========================================================================
   Safe Area Insets
   ========================================================================== */

.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.safe-area-top {
    padding-top: env(safe-area-inset-top, 0);
}

/* ==========================================================================
   Touch Device Optimizations
   ========================================================================== */

@media (hover: none) and (pointer: coarse) {
    .touch-target {
        min-height: 44px;
        min-width: 44px;
    }
    
    .touch-padding {
        padding: 0.75rem;
    }
    
    .touch-text {
        font-size: 16px;
    }
    
    .hover-lift:hover {
        transform: none;
    }
}

/* ==========================================================================
   High Contrast Mode
   ========================================================================== */

@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--border);
    }
    
    .btn-primary {
        border: 2px solid currentColor;
    }
    
    a {
        text-decoration: underline;
    }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ==========================================================================
   Performance Classes
   ========================================================================== */

.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

.content-visibility-auto {
    content-visibility: auto;
}

/* ==========================================================================
   Loading spinner
   ========================================================================== */

.loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
}

/* ==========================================================================
   Mobile Loading States
   ========================================================================== */

.mobile-loading {
    position: fixed;
    inset: 0;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
}

.mobile-loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
}

/* ==========================================================================
   Mobile Error States
   ========================================================================== */

.mobile-error {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    background: var(--error);
    color: white;
    padding: 1rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    z-index: var(--z-tooltip);
    animation: slideUp 0.3s ease-out;
}

.mobile-error-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.25rem;
}

/* ==========================================================================
   Mobile Action Sheet
   ========================================================================== */

.mobile-action-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 1rem;
    z-index: var(--z-modal);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.mobile-action-sheet.open {
    transform: translateY(0);
}

.mobile-action-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.mobile-action-item:hover {
    background: var(--surface-hover);
}

.mobile-action-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--text-tertiary);
}

.mobile-action-label {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

/* ==========================================================================
   Bottom Sheet Modal
   ========================================================================== */

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: var(--shadow-xl);
    max-height: 90vh;
    overflow-y: auto;
    z-index: var(--z-modal);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.bottom-sheet.open {
    transform: translateY(0);
}

.bottom-sheet-handle {
    width: 2rem;
    height: 0.25rem;
    background: var(--border);
    border-radius: var(--radius-full);
    margin: 0.75rem auto;
}

/* ==========================================================================
   Keyboard Avoidance
   ========================================================================== */

.keyboard-avoiding {
    padding-bottom: env(keyboard-inset-height, 0);
}

/* ==========================================================================
   Mobile-specific animations
   ========================================================================== */

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

.mobile-slide-in {
    animation: slideInRight 0.3s ease-out;
}

.mobile-slide-out {
    animation: slideOutLeft 0.3s ease-out;
}

/* ==========================================================================
   Swipe gestures hint
   ========================================================================== */

.swipe-hint {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    animation: slideUp 2s ease-in-out infinite;
}

/* ==========================================================================
   Pull to refresh
   ========================================================================== */

.pull-to-refresh {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: var(--z-fixed);
}

.pull-to-refresh.active {
    transform: translateY(0);
}

/* ==========================================================================
   Mobile tab bar indicators
   ========================================================================== */

.tab-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: var(--radius-full);
    transition: left 0.3s ease, width 0.3s ease;
}

/* ==========================================================================
   Mobile scroll snap for carousels
   ========================================================================== */

.mobile-carousel {
    scroll-snap-type: x mandatory;
    scroll-padding: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-carousel-item {
    scroll-snap-align: start;
    flex: 0 0 calc(100% - 2rem);
}

/* ==========================================================================
   Mobile search overlay
   ========================================================================== */

.mobile-search-overlay {
    position: fixed;
    inset: 0;
    background: var(--surface);
    z-index: var(--z-modal);
    display: flex;
    flex-direction: column;
}

.mobile-search-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.mobile-search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 1rem;
}

.mobile-search-close {
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 0.5rem;
    cursor: pointer;
}

.mobile-search-results {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* ==========================================================================
   Mobile notification center
   ========================================================================== */

.mobile-notifications {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface);
    z-index: var(--z-modal);
    display: flex;
    flex-direction: column;
}

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

.mobile-notifications-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.mobile-notifications-list {
    flex: 1;
    overflow-y: auto;
}

/* ==========================================================================
   Mobile share sheet
   ========================================================================== */

.mobile-share-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 1rem;
    z-index: var(--z-modal);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.mobile-share-sheet.open {
    transform: translateY(0);
}

.mobile-share-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.mobile-share-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.mobile-share-item:hover {
    background: var(--surface-hover);
}

.mobile-share-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
}

.mobile-share-label {
    font-size: 0.75rem;
    text-align: center;
    color: var(--text-secondary);
}

/* ==========================================================================
   Notification Bubbles
   ========================================================================== */

.notification-bubble {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    width: 1.25rem;
    height: 1.25rem;
    background: var(--error);
    border: 2px solid var(--surface);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 700;
    color: white;
    animation: pulseSubtle 2s infinite;
}

/* ==========================================================================
   Onboarding Tour
   ========================================================================== */

.onboarding-tour {
    position: fixed;
    z-index: var(--z-tooltip);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 20rem;
    padding: 1rem;
}

.onboarding-tour-arrow {
    position: absolute;
    width: 0.75rem;
    height: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    transform: rotate(45deg);
}

.onboarding-tour-content {
    margin-bottom: 1rem;
}

.onboarding-tour-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

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

.onboarding-tour-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

/* ==========================================================================
   Keyboard Shortcuts
   ========================================================================== */

.keyboard-shortcut {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

.keyboard-shortcut kbd {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
}

/* ==========================================================================
   Poll Component
   ========================================================================== */

.poll {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1rem 0;
}

.poll-question {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.poll-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.poll-option {
    position: relative;
}

.poll-option-bar {
    height: 2.5rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all var(--transition);
}

.poll-option-bar:hover {
    border-color: var(--primary-light);
}

.poll-option-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: rgba(255, 107, 53, 0.15);
    width: 0%;
    transition: width 0.6s ease;
}

.poll-option-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    z-index: 1;
}

.poll-option-text {
    font-weight: 500;
    color: var(--text-primary);
}

.poll-option-percent {
    font-weight: 600;
    color: var(--primary);
}

.poll-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--divider);
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

/* ==========================================================================
   Karma Display
   ========================================================================== */

.karma-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--success);
}

.karma-badge .icon {
    width: 0.75rem;
    height: 0.75rem;
    fill: currentColor;
}

/* ==========================================================================
   Empty States
   ========================================================================== */

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1.5rem;
    color: var(--text-tertiary);
}

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

.empty-state-description {
    color: var(--text-secondary);
    max-width: 24rem;
    margin: 0 auto 1.5rem;
}

/* ==========================================================================
   Community Badges
   ========================================================================== */

.community-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.community-badge:hover {
    background: var(--surface-hover);
    border-color: var(--primary-light);
    color: var(--text-primary);
}

.community-badge-icon {
    width: 1rem;
    height: 1rem;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

/* ==========================================================================
   Media Controls
   ========================================================================== */

.media-controls {
    display: flex;
    gap: 0.5rem;
}

.media-control {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition);
}

.media-control:hover {
    background: white;
    transform: scale(1.1);
}

.dark .media-control {
    background: rgba(31, 41, 55, 0.9);
    color: white;
}

/* ==========================================================================
   Custom Scroll Snap
   ========================================================================== */

.scroll-snap-x {
    scroll-snap-type: x mandatory;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.scroll-snap-item {
    scroll-snap-align: start;
    flex-shrink: 0;
}

/* ==========================================================================
   Gradient Text Effects
   ========================================================================== */

.gradient-text-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.gradient-text-success {
    background: linear-gradient(135deg, var(--success), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ==========================================================================
   Custom Selection Colors
   ========================================================================== */

.custom-selection::selection {
    background: var(--primary);
    color: white;
}

/* ==========================================================================
   Smooth Scrolling Sections
   ========================================================================== */

.smooth-scroll {
    scroll-behavior: smooth;
}

/* ==========================================================================
   Custom Cursor (Optional)
   ========================================================================== */

.custom-cursor-pointer {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='6' cy='6' r='5' fill='%23FF6B35' opacity='0.8'/%3E%3C/svg%3E") 6 6, auto;
}

/* ==========================================================================
   RTL Support
   ========================================================================== */

[dir="rtl"] .comment-replies {
    margin-left: 0;
    margin-right: 2rem;
    padding-left: 0;
    padding-right: 1rem;
    border-left: none;
    border-right: 2px solid var(--border-light);
}

[dir="rtl"] h2::before {
    left: auto;
    right: 0;
}

/* ==========================================================================
   Performance Monitoring
   ========================================================================== */

.perf-marker {
    position: fixed;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    background: red;
    opacity: 0;
    pointer-events: none;
}

/* ==========================================================================
   Custom Properties Debug
   ========================================================================== */

.debug-custom-properties::before {
    content: '--primary: ' var(--primary) '; --secondary: ' var(--secondary);
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    z-index: 9999;
}

/* ==========================================================================
   End of GameDepth Professional CSS
   ========================================================================== */

 /* Add these to your CSS in the Animation Utilities section */
.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.3s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.2s ease-out;
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* Game-specific styles */
.game-cover {
    aspect-ratio: 3/4;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
}

.game-banner {
    aspect-ratio: 16/6;
    object-fit: cover;
}

.game-score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1.25rem;
    border: 3px solid currentColor;
}

.game-score-excellent {
    background: var(--success);
    color: white;
}

.game-score-good {
    background: var(--primary);
    color: white;
}

.game-score-average {
    background: var(--warning);
    color: white;
}

.game-score-poor {
    background: var(--error);
    color: white;
}

/* Analysis templates */
.analysis-template {
    border-left: 4px solid var(--primary);
    background: var(--primary-50);
}

.analysis-section {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

/* Streamer cards */
.streamer-card-live {
    border: 2px solid var(--error);
    position: relative;
}

.streamer-card-live::before {
    content: 'LIVE';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--error);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    animation: pulse 2s infinite;
}

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

/* ==========================================================================
   Game Browser Specific Styles
   ========================================================================== */

/* Hero Section */
.hero-section {
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

/* Search */
.search-container {
    max-width: 700px;
    margin: 0 auto 2rem;
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 3rem;
    font-size: 1.125rem;
    border-radius: 1rem;
    border: 2px solid var(--border);
    background: var(--surface);
    color: var(--text);
    transition: all var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 1.25rem;
}

.search-button {
    position: absolute;
    right: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition);
}

.search-button:hover {
    background: var(--primary-dark);
}

.quick-suggestions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.suggestion-label {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.suggestion-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 9999px;
    font-size: 0.875rem;
    color: var(--primary);
    text-decoration: none;
    transition: all var(--transition);
}

.suggestion-tag:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
}

/* Main Layout */
.main-layout {
    display: flex;
    gap: 2rem;
    padding: 2rem 0;
}

.sidebar {
    flex: 0 0 280px;
}

.content-main {
    flex: 1;
    min-width: 0;
}

.sticky-sidebar {
    position: sticky;
    top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Filter Card */
.filter-card {
    padding: 1.5rem;
}

.filter-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.filter-list {
    max-height: 12rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color var(--transition);
}

.filter-item:hover {
    background: var(--surface-hover);
}

.filter-checkbox {
    width: 1rem;
    height: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    margin-right: 0.5rem;
}

.filter-checkbox:checked {
    background: var(--primary);
    border-color: var(--primary);
}

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

.year-range {
    display: flex;
    gap: 0.5rem;
}

.year-input {
    flex: 1;
}

.form-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-size: 0.875rem;
    cursor: pointer;
}

.filter-actions {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Stats Card */
.stats-card {
    padding: 1.5rem;
}

.stats-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

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

.stat-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.stat-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

/* Import Card */
.import-card {
    padding: 1.5rem;
    text-align: center;
}

.import-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.import-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Toolbar */
.toolbar {
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
}

.toolbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.highlight {
    font-weight: 700;
    color: var(--text);
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

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

.sort-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sort-option {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition);
    background: var(--surface-hover);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.sort-option:hover {
    background: var(--surface);
    color: var(--text);
}

.sort-option.active {
    background: var(--primary);
    color: white;
}

.view-toggle-group {
    display: flex;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.view-toggle-btn {
    background: var(--surface);
    border: none;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.view-toggle-btn:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.view-toggle-btn.active {
    background: var(--primary);
    color: white;
}

/* Active Filters */
.active-filters {
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
}

.filters-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.filters-tags {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 9999px;
    font-size: 0.75rem;
    color: var(--primary);
}

.filter-remove {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.clear-all {
    font-size: 0.875rem;
    color: var(--primary);
    text-decoration: none;
    white-space: nowrap;
}

/* Games Container */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.games-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.list-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Empty State */
.empty-state {
    padding: 4rem 1rem;
    text-align: center;
}

.empty-content {
    max-width: 400px;
    margin: 0 auto;
}

.empty-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1.5rem;
    color: var(--text-tertiary);
}

.empty-icon i {
    font-size: 3rem;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

.empty-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

/* Pagination */
.pagination-wrapper {
    margin: 2rem 0;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pagination-numbers {
    display: flex;
    gap: 0.25rem;
}

.page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all var(--transition);
}

.page-number:hover {
    background: var(--surface-hover);
}

.page-number.current {
    background: var(--primary);
    color: white;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Featured Sections */
.featured-sections {
    margin-top: 3rem;
}

.featured-section {
    margin-bottom: 2.5rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon-fire {
    color: #ef4444;
}

.icon-clock {
    color: #3b82f6;
}

.section-link {
    font-size: 0.875rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.trending-games {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.trending-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

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

.trending-link {
    display: block;
    text-decoration: none;
}

.trending-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.trending-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.trending-card:hover .trending-img {
    transform: scale(1.05);
}

.trending-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    padding: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trending-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.75rem 0.75rem;
    font-size: 0.75rem;
}

.trending-count {
    color: var(--text-tertiary);
}

.trending-score {
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.75rem;
}

.recent-games-scroll {
    overflow-x: auto;
}

.recent-games {
    display: flex;
    gap: 1rem;
    padding-bottom: 0.5rem;
}

.recent-card {
    flex: 0 0 200px;
}

.recent-inner {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    height: 100%;
}

.recent-link {
    display: block;
    text-decoration: none;
    height: 100%;
}

.recent-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

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

.recent-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    padding: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-meta {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    padding: 0 0.75rem 0.75rem;
}

/* Metacritic Score Classes */
.metacritic-90 { background-color: #66cc33; color: white; }
.metacritic-80 { background-color: #99cc33; color: white; }
.metacritic-70 { background-color: #ffcc33; color: #333; }
.metacritic-60 { background-color: #ff9966; color: #333; }
.metacritic-50 { background-color: #ff6666; color: white; }

/* Responsive Design */
@media (max-width: 1024px) {
    .main-layout {
        flex-direction: column;
    }
    
    .sidebar {
        flex: none;
        width: 100%;
    }
    
    .sticky-sidebar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
        position: static;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .trending-games {
        grid-template-columns: 1fr;
    }
    
    .toolbar-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-right {
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .search-button {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .empty-actions {
        flex-direction: column;
    }
    
    .empty-actions .btn {
        width: 100%;
    }
}

/* Metacritic Score Classes */
.metacritic-90, .metacritic-100 {
    background-color: #66cc33;
    color: white;
}

.metacritic-80, .metacritic-89, .metacritic-81, .metacritic-82, .metacritic-83, 
.metacritic-84, .metacritic-85, .metacritic-86, .metacritic-87, .metacritic-88 {
    background-color: #99cc33;
    color: white;
}

.metacritic-70, .metacritic-71, .metacritic-72, .metacritic-73, .metacritic-74,
.metacritic-75, .metacritic-76, .metacritic-77, .metacritic-78, .metacritic-79 {
    background-color: #ffcc33;
    color: #333;
}

.metacritic-60, .metacritic-61, .metacritic-62, .metacritic-63, .metacritic-64,
.metacritic-65, .metacritic-66, .metacritic-67, .metacritic-68, .metacritic-69 {
    background-color: #ff9966;
    color: #333;
}

.metacritic-0, .metacritic-1, .metacritic-2, .metacritic-3, .metacritic-4,
.metacritic-5, .metacritic-6, .metacritic-7, .metacritic-8, .metacritic-9,
.metacritic-10, .metacritic-11, .metacritic-12, .metacritic-13, .metacritic-14,
.metacritic-15, .metacritic-16, .metacritic-17, .metacritic-18, .metacritic-19,
.metacritic-20, .metacritic-21, .metacritic-22, .metacritic-23, .metacritic-24,
.metacritic-25, .metacritic-26, .metacritic-27, .metacritic-28, .metacritic-29,
.metacritic-30, .metacritic-31, .metacritic-32, .metacritic-33, .metacritic-34,
.metacritic-35, .metacritic-36, .metacritic-37, .metacritic-38, .metacritic-39,
.metacritic-40, .metacritic-41, .metacritic-42, .metacritic-43, .metacritic-44,
.metacritic-45, .metacritic-46, .metacritic-47, .metacritic-48, .metacritic-49,
.metacritic-50, .metacritic-51, .metacritic-52, .metacritic-53, .metacritic-54,
.metacritic-55, .metacritic-56, .metacritic-57, .metacritic-58, .metacritic-59 {
    background-color: #ff6666;
    color: white;
}

.metacritic-na {
    background-color: #cccccc;
    color: #666666;
}

/* Score badge styling */
.trending-score, .game-score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 1.5rem;
    padding: 0 0.5rem;
    border-radius: 0.25rem;
    font-weight: 700;
    font-size: 0.75rem;
    line-height: 1;
}

/* Add to your main styles.css */
.streamer-card {
    transition: all 0.3s ease;
}

.streamer-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.platform-badge.twitch {
    background-color: rgba(145, 70, 255, 0.1);
    color: #9146FF;
}

.platform-badge.youtube {
    background-color: rgba(255, 0, 0, 0.1);
    color: #FF0000;
}

.platform-badge.kick {
    background-color: rgba(0, 255, 56, 0.1);
    color: #00FF38;
}

.live-badge {
    animation: pulse 2s infinite;
}

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

.highlight-thumbnail {
    position: relative;
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
}

.highlight-thumbnail:hover .play-overlay {
    opacity: 1;
}

.play-overlay {
    transition: opacity 0.3s ease;
    opacity: 0.8;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

 
/* ── Base nav container ── */
nav[x-data="navbar()"] {
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
    transition: box-shadow 0.2s ease, background 0.2s ease;
}

.dark nav[x-data="navbar()"] {
    background: #030712;
    border-bottom-color: #1f2937;
}

/* ── Inner wrapper ── */
.navbar-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    height: 3.5rem;
    gap: 0.75rem;
}

/* ── Logo ── */
.navbar-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    text-decoration: none;
}

.navbar-logo img {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.375rem;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.navbar-logo:hover img {
    transform: scale(1.05);
}

/* ⭐ NEW GTC GRADIENT (blue → cyan → orange) */
.navbar-logo-text {
    font-size: 1.125rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #2563eb, #06b6d4, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

/* ⭐ Lightened gradient for dark mode */
.dark .navbar-logo-text {
    background: linear-gradient(135deg, #93c5fd, #67e8f9, #fdba74);
}

/* ── Desktop nav links ── */
.navbar-links {
    display: none;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.nav-link {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: color 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}

.dark .nav-link { color: #9ca3af; }

.nav-link:hover {
    color: #111827;
    background: #f3f4f6;
}

.dark .nav-link:hover {
    color: #f9fafb;
    background: #1f2937;
}

.nav-link-active {
    color: #1E3A8A !important;
    background: #f5f3ff !important;
}

.dark .nav-link-active {
    color: #60A5FA !important;
    background: #1e3a8a !important;
}

/* ── Search bar ── */
.navbar-search {
    display: none;
    flex: 1;
    max-width: 28rem;
    margin: 0 auto;
}

.navbar-search-wrap {
    position: relative;
    width: 100%;
}

.navbar-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: #9ca3af;
    pointer-events: none;
}

.navbar-search-input {
    width: 100%;
    padding: 0.5rem 2.25rem 0.5rem 2.25rem;
    font-size: 0.875rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    color: #111827;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.dark .navbar-search-input {
    background: #111827;
    border-color: #374151;
    color: #f3f4f6;
}

.navbar-search-input::placeholder { color: #9ca3af; }

.navbar-search-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    background: #ffffff;
}

.dark .navbar-search-input:focus {
    background: #1f2937;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.navbar-search-kbd {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.625rem;
    color: #9ca3af;
    border: 1px solid #e5e7eb;
    border-radius: 0.25rem;
    padding: 0.125rem 0.375rem;
    font-family: monospace;
    display: none;
    pointer-events: none;
}

.dark .navbar-search-kbd { border-color: #374151; }

/* ── Right actions ── */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
    flex-shrink: 0;
}

/* ── Create post button ── */
.navbar-create-btn {
    display: none;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.1s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.navbar-create-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.navbar-create-btn:active { transform: translateY(0); }
.navbar-create-btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.navbar-create-label { display: none; }

/* ── Icon button ── */
.icon-btn {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    color: #6b7280;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: color 0.15s ease, background 0.15s ease;
    text-decoration: none;
}

.icon-btn:hover { color: #111827; background: #f3f4f6; }
.dark .icon-btn { color: #9ca3af; }
.dark .icon-btn:hover { color: #f9fafb; background: #1f2937; }
.icon-btn svg { width: 1.25rem; height: 1.25rem; }

/* ── Notification badge ── */
.notif-badge {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    min-width: 1.125rem;
    height: 1.125rem;
    padding: 0 0.25rem;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Dropdown panel (shared) ── */
.dropdown-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    z-index: 100;
}

.dark .dropdown-panel {
    background: #111827;
    border-color: #1f2937;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Notifications dropdown */
.notif-dropdown { width: 20rem; }

.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.dark .notif-header { border-bottom-color: #1f2937; }

.notif-header-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
}

.dark .notif-header-title { color: #f9fafb; }

.notif-mark-all {
    font-size: 0.75rem;
    color: #4f46e5;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.notif-mark-all:hover { text-decoration: underline; }
.dark .notif-mark-all { color: #a78bfa; }

.notif-list { max-height: 20rem; overflow-y: auto; }

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    transition: background 0.1s ease;
    border-bottom: 1px solid #f9fafb;
}

.dark .notif-item { border-bottom-color: #1f2937; }
.notif-item:hover { background: #f9fafb; }
.dark .notif-item:hover { background: rgba(31, 41, 55, 0.6); }
.notif-item-unread { background: rgba(245, 243, 255, 0.5); }
.dark .notif-item-unread { background: rgba(124, 58, 237, 0.08); }

.notif-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.375rem;
}

.notif-dot-unread { background: #4f46e5; }
.notif-dot-read { background: transparent; }

.notif-text { font-size: 0.875rem; color: #374151; line-height: 1.4; }
.dark .notif-text { color: #e5e7eb; }
.notif-time { font-size: 0.75rem; color: #9ca3af; margin-top: 0.125rem; }
.notif-empty { padding: 2rem 1rem; text-align: center; font-size: 0.875rem; color: #9ca3af; }

.notif-footer {
    padding: 0.625rem 1rem;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.dark .notif-footer { border-top-color: #1f2937; }
.notif-footer a { font-size: 0.75rem; color: #4f46e5; text-decoration: none; }
.dark .notif-footer a { color: #a78bfa; }
.notif-footer a:hover { text-decoration: underline; }

.notif-list::-webkit-scrollbar { width: 4px; }
.notif-list::-webkit-scrollbar-track { background: transparent; }
.notif-list::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 9999px; }
.dark .notif-list::-webkit-scrollbar-thumb { background: #374151; }

/* ── User menu ── */
.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem 0.25rem 0.25rem;
    border-radius: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
}

.user-menu-btn:hover { background: #f3f4f6; }
.dark .user-menu-btn:hover { background: #1f2937; }

.user-avatar {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #4f46e5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    overflow: hidden;
    flex-shrink: 0;
}

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

.user-menu-name {
    display: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    max-width: 5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dark .user-menu-name { color: #d1d5db; }

.user-menu-chevron {
    display: none;
    width: 0.875rem;
    height: 0.875rem;
    color: #9ca3af;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.user-dropdown { width: 13rem; }

.user-dropdown-header {
    padding: 0.625rem 1rem 0.5rem;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 0.25rem;
}

.dark .user-dropdown-header { border-bottom-color: #1f2937; }

.user-dropdown-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dark .user-dropdown-name { color: #f9fafb; }

.user-dropdown-email {
    font-size: 0.75rem;
    color: #9ca3af;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #4b5563;
    text-decoration: none;
    transition: color 0.1s ease, background 0.1s ease;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}

.dark .menu-item { color: #9ca3af; }
.menu-item:hover { color: #111827; background: #f9fafb; }
.dark .menu-item:hover { color: #f9fafb; background: #1f2937; }
.menu-item svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.menu-item-danger { color: #ef4444 !important; }
.menu-item-danger:hover { background: #fef2f2 !important; }
.dark .menu-item-danger:hover { background: rgba(239, 68, 68, 0.1) !important; }

.menu-divider { height: 1px; background: #f0f0f0; margin: 0.25rem 0; }
.dark .menu-divider { background: #1f2937; }

/* ── Guest auth buttons ── */
.auth-login-btn {
    display: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: color 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}

.auth-login-btn:hover { color: #111827; background: #f3f4f6; }
.dark .auth-login-btn { color: #9ca3af; }
.dark .auth-login-btn:hover { color: #f9fafb; background: #1f2937; }

.auth-signup-btn {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    background: #4f46e5;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.auth-signup-btn:hover { background: #6d28d9; }

/* ── Mobile menu ── */
.mobile-menu {
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
}

.dark .mobile-menu {
    background: #030712;
    border-bottom-color: #1f2937;
}

.mobile-menu-search { padding: 0.75rem 1rem 0.5rem; }

.mobile-search-wrap { position: relative; }

.mobile-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: #9ca3af;
    pointer-events: none;
}

.mobile-menu-search input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.25rem;
    font-size: 0.875rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    color: #111827;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dark .mobile-menu-search input {
    background: #111827;
    border-color: #374151;
    color: #f3f4f6;
}

.mobile-menu-search input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.mobile-menu-nav {
    padding: 0.5rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.mobile-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: color 0.1s ease, background 0.1s ease;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}

.dark .mobile-link { color: #d1d5db; }
.mobile-link:hover { color: #111827; background: #f3f4f6; }
.dark .mobile-link:hover { color: #f9fafb; background: #1f2937; }
.mobile-link svg { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.mobile-link-accent { color: #4f46e5; font-weight: 600; }
.dark .mobile-link-accent { color: #a78bfa; }
.mobile-link-danger { color: #ef4444; }
.mobile-link-danger:hover { background: #fef2f2; }
.dark .mobile-link-danger:hover { background: rgba(239, 68, 68, 0.1); }

.mobile-menu-divider { height: 1px; background: #f0f0f0; margin: 0.375rem 0; }
.dark .mobile-menu-divider { background: #1f2937; }

[x-cloak] { display: none !important; }


/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* xs: 0–479px — small phones */
@media (max-width: 479px) {
    .navbar-inner {
        padding: 0 0.75rem;
        gap: 0.5rem;
    }
    .navbar-logo-text { font-size: 1rem; }
    .icon-btn { width: 2rem; height: 2rem; }
    .icon-btn svg { width: 1.125rem; height: 1.125rem; }
    .auth-signup-btn { padding: 0.375rem 0.5rem; font-size: 0.8125rem; }
}

/* sm: 480px+ — large phones */
@media (min-width: 480px) {
    .navbar-create-btn { display: flex; }
    .auth-login-btn { display: block; }
    .navbar-search-kbd { display: block; }
}

/* md: 640px+ — tablets portrait */
@media (min-width: 640px) {
    .navbar-inner { padding: 0 1.5rem; gap: 1rem; }
    .navbar-create-label { display: inline; }
}

/* lg: 768px+ — tablets landscape */
@media (min-width: 768px) {
    .user-menu-name { display: block; }
    .user-menu-chevron { display: block; }
}

/* xl: 1024px+ — desktop */
@media (min-width: 1024px) {
    .navbar-inner { padding: 0 2rem; gap: 0.75rem; }
    .navbar-links { display: flex; }
    .navbar-search { display: flex; }
}

/* 2xl: 1280px+ — large desktop */
@media (min-width: 1280px) {
    .navbar-search { max-width: 32rem; }
}


/* ============================================================
   ACCESSIBILITY
   ============================================================ */

.nav-link:focus-visible,
.icon-btn:focus-visible,
.navbar-create-btn:focus-visible,
.auth-signup-btn:focus-visible,
.auth-login-btn:focus-visible,
.mobile-link:focus-visible,
.menu-item:focus-visible,
.navbar-search-input:focus-visible,
.user-menu-btn:focus-visible {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}

/* Touch targets */
@media (hover: none) and (pointer: coarse) {
    .nav-link, .mobile-link, .menu-item { min-height: 2.75rem; }
    .icon-btn { min-width: 2.75rem; min-height: 2.75rem; }
    /* Prevent zoom on iOS */
    .navbar-search-input,
    .mobile-menu-search input { font-size: 1rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .navbar-logo img, .nav-link, .icon-btn, .navbar-create-btn,
    .auth-signup-btn, .mobile-link, .menu-item, .user-menu-btn,
    nav[x-data="navbar()"] {
        transition: none !important;
        transform: none !important;
        animation: none !important;
    }
}

/* High contrast */
@media (prefers-contrast: high) {
    nav[x-data="navbar()"] { border-bottom: 2px solid currentColor; }
    .nav-link-active { text-decoration: underline; }
    .navbar-search-input { border-width: 2px; }
}

/* Print */
@media print {
    nav[x-data="navbar()"] { display: none !important; }
}

/* Button Styles for Navbar - ADDED */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    border-radius: var(--radius);
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    transition: all var(--transition);
    cursor: pointer;
    user-select: none;
    gap: 0.5rem;
    min-height: 44px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--accent-dark));
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    min-height: 36px;
}

/* Ensure proper stacking context */
.navbar {
    isolation: isolate;
}

/* Fix for search results dropdown */
#search-results,
#mobile-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
}

/* Fix for mobile search */
#mobile-search {
    transition: all var(--transition);
}

#mobile-search:not(.hidden) {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* Fix for avatar initials fallback */
.avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Fix for animation keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

 


/* Image loading animation */
.image-loading {
    animation: pulse 1.5s infinite;
}

.image-loading.loaded {
    opacity: 0;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 0.3; }
}

/* Fullscreen modal */
#fullscreen-modal {
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
}

#fullscreen-image {
    transform-origin: center center;
    transition: transform 0.2s ease-out;
}

#fullscreen-image.zoomed {
    transform: scale(1.5);
    cursor: zoom-out;
}


 

/* post card animation */

 /* Pinned Posts Section */
.pinned-posts-section {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #3b82f6;
}

.dark .pinned-posts-section {
    background: #1f2937;
    border-left-color: #60a5fa;
}

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

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.25rem 0;
}

.dark .section-title {
    color: #f9fafb;
}

.section-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.dark .section-subtitle {
    color: #9ca3af;
}

.pinned-count {
    display: flex;
    align-items: center;
}

.count-badge {
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.dark .count-badge {
    background: #1e3a8a;
    color: #93c5fd;
}

/* Pinned Posts List */
.pinned-posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pinned-post-card {
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.dark .pinned-post-card {
    background: #374151;
    border-color: #4b5563;
}

.pinned-post-card:hover {
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.dark .pinned-post-card:hover {
    border-color: #60a5fa;
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.2);
}

.pinned-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #dbeafe;
    color: #1d4ed8;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.dark .pinned-indicator {
    background: #1e3a8a;
    color: #93c5fd;
}

.pinned-indicator i {
    font-size: 0.625rem;
}

.post-header {
    margin-bottom: 0.75rem;
}

.post-title h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.dark .post-title h4 {
    color: #f9fafb;
}

.title-link {
    text-decoration: none;
    color: inherit;
}

.title-link:hover h4 {
    color: #3b82f6;
}

.dark .title-link:hover h4 {
    color: #60a5fa;
}

.post-flags {
    display: flex;
    gap: 0.5rem;
}

.flag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

.flag.nsfw {
    background: #fee2e2;
    color: #dc2626;
}

.dark .flag.nsfw {
    background: #7f1d1d;
    color: #fca5a5;
}

.flag.spoiler {
    background: #f3e8ff;
    color: #4f46e5;
}

.dark .flag.spoiler {
    background: #4c1d95;
    color: #c4b5fd;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.dark .post-meta {
    color: #9ca3af;
}

.meta-left, .meta-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author {
    font-weight: 500;
}

.separator {
    opacity: 0.5;
}

.stats {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stats i {
    font-size: 0.625rem;
}

.post-excerpt {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.dark .post-excerpt {
    color: #9ca3af;
    border-top-color: #374151;
}

/* Make sure pinned posts don't appear in regular list */
.post-card[data-pinned="true"] {
    display: none !important;
}









/* User posts*/

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.animate-scale-in {
    animation: scaleIn 0.3s ease-out;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}


/* ===== COOKIE BANNER STYLES ===== */

#cookie-consent {
    will-change: transform;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999; /* Ensure it's above everything */
}

#cookie-consent.translate-y-full {
    transform: translateY(100%);
}

/* Toggle Switch */
.toggle-bg {
    transition: background-color 0.2s;
    position: relative;
    width: 40px;
    height: 20px;
    border-radius: 9999px;
}

.toggle-circle {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 9999px;
    background-color: white;
    transition: transform 0.2s;
}

.toggle-bg.bg-primary .toggle-circle {
    transform: translateX(20px);
}

.toggle-bg.bg-gray-300 .toggle-circle {
    transform: translateX(0);
}

.dark .toggle-bg.bg-gray-700 .toggle-circle {
    transform: translateX(0);
}

/* Safe area support */
@supports (padding: max(0px)) {
    #cookie-consent {
        padding-bottom: max(1rem, env(safe-area-inset-bottom, 1rem));
    }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    #cookie-consent {
        transition: none;
    }
    
    .toggle-circle {
        transition: none;
    }
}

/* Print styles */
@media print {
    #cookie-consent,
    #cookie-notice {
        display: none !important;
    }
}
/* ===== NOTIFICATION STYLES (FIXED) ===== */

/* Base notification styles */
.notification-toast,
.fixed.top-4.right-4.z-50,
[class*="animate-slide-in"] {
    background: var(--surface) !important;
    background-color: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-xl) !important;
    padding: 1rem 1.25rem !important;
    color: var(--text) !important;
    opacity: 1 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: white !important;
}

.dark .notification-toast,
.dark .fixed.top-4.right-4.z-50,
.dark [class*="animate-slide-in"] {
    background: #1f2937 !important;
    background-color: #1f2937 !important;
    color: #f9fafb !important;
}

/* Success notification */
.notification-success,
.fixed.top-4.right-4.z-50.bg-green-50,
[class*="bg-green-50"] {
    background: #f0fdf4 !important;
    background-color: #f0fdf4 !important;
    border-color: #86efac !important;
    color: #166534 !important;
}

.dark .notification-success,
.dark .fixed.top-4.right-4.z-50.bg-green-50,
.dark [class*="bg-green-50"] {
    background: #14532d !important;
    background-color: #14532d !important;
    border-color: #22c55e !important;
    color: #f0fdf4 !important;
}

/* Error notification */
.notification-error,
.fixed.top-4.right-4.z-50.bg-red-50,
[class*="bg-red-50"] {
    background: #fef2f2 !important;
    background-color: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #b91c1c !important;
}

.dark .notification-error,
.dark .fixed.top-4.right-4.z-50.bg-red-50,
.dark [class*="bg-red-50"] {
    background: #7f1d1d !important;
    background-color: #7f1d1d !important;
    border-color: #ef4444 !important;
    color: #fee2e2 !important;
}

/* Warning notification */
.notification-warning,
.fixed.top-4.right-4.z-50.bg-amber-50,
[class*="bg-amber-50"] {
    background: #fffbeb !important;
    background-color: #fffbeb !important;
    border-color: #fcd34d !important;
    color: #92400e !important;
}

.dark .notification-warning,
.dark .fixed.top-4.right-4.z-50.bg-amber-50,
.dark [class*="bg-amber-50"] {
    background: #78350f !important;
    background-color: #78350f !important;
    border-color: #f59e0b !important;
    color: #fef3c7 !important;
}

/* Info notification */
.notification-info,
.fixed.top-4.right-4.z-50.bg-cyan-50,
[class*="bg-cyan-50"] {
    background: #ecfeff !important;
    background-color: #ecfeff !important;
    border-color: #67e8f9 !important;
    color: #0e7490 !important;
}

.dark .notification-info,
.dark .fixed.top-4.right-4.z-50.bg-cyan-50,
.dark [class*="bg-cyan-50"] {
    background: #164e63 !important;
    background-color: #164e63 !important;
    border-color: #22d3ee !important;
    color: #cffafe !important;
}

/* Icon styles */
.notification-toast span:first-child,
.fixed.top-4.right-4.z-50 span:first-child,
[class*="animate-slide-in"] span:first-child {
    font-size: 1.25rem !important;
    opacity: 1 !important;
}

/* Message text */
.notification-toast span:nth-child(2),
.fixed.top-4.right-4.z-50 span:nth-child(2),
[class*="animate-slide-in"] span:nth-child(2) {
    font-weight: 500 !important;
    font-size: 0.9375rem !important;
    line-height: 1.4 !important;
    opacity: 1 !important;
}

/* Close button */
.notification-close,
.fixed.top-4.right-4.z-50 button,
[class*="animate-slide-in"] button {
    background: transparent !important;
    border: none !important;
    color: inherit !important;
    opacity: 0.7 !important;
    font-size: 1rem !important;
    cursor: pointer !important;
    padding: 0.25rem !important;
    margin-left: 0.5rem !important;
    transition: opacity 0.2s ease !important;
}

.notification-close:hover,
.fixed.top-4.right-4.z-50 button:hover,
[class*="animate-slide-in"] button:hover {
    opacity: 1 !important;
}

/* Animation */
@keyframes slideInNotification {
    from {
        opacity: 0 !important;
        transform: translateX(110%) !important;
    }
    to {
        opacity: 1 !important;
        transform: translateX(0) !important;
    }
}

.animate-slide-in {
    animation: slideInNotification 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

/* Ensure notifications are above everything */
.fixed.top-4.right-4.z-50,
.notification-toast,
[class*="animate-slide-in"] {
    z-index: 99999 !important;
    position: fixed !important;
    top: 1rem !important;
    right: 1rem !important;
    max-width: 24rem !important;
    width: auto !important;
    min-width: 18rem !important;
    pointer-events: auto !important;
}

/* Remove any backdrop filters that might cause transparency */
.fixed.top-4.right-4.z-50,
.notification-toast,
[class*="animate-slide-in"] {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background-clip: padding-box !important;
}

/* Override any global styles that might affect notifications */
body .fixed.top-4.right-4.z-50,
body .notification-toast,
body [class*="animate-slide-in"] {
    background-color: var(--surface) !important;
    background-image: none !important;
    border: 1px solid var(--border) !important;
}

/* Dark mode specific overrides */
.dark .fixed.top-4.right-4.z-50,
.dark .notification-toast,
.dark [class*="animate-slide-in"] {
    background-color: #1f2937 !important;
    border-color: #374151 !important;
    color: #f9fafb !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4) !important;
}
/* ===== SPINNER ANIMATION ===== */

.animate-spin-slow {
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}a.tab-active,
a.sort-tab.tab-active {
    background-image: linear-gradient(to right, #2563eb, #06b6d4 ) !important;
    background-color: #0891b2 !important;
    color: white !important;
 
}

a.sort-tab.tab-inactive {
    color: #374151;
    background: transparent;
}

.dark a.sort-tab.tab-inactive {
    color: #d1d5db;
}

a.sort-tab.tab-inactive:hover {
    background: rgba(6, 182, 212, 0.15) !important;
    color: #0891b2 !important;
}