/**
 * EdgeWords Frontend - Premium Design System
 * 
 * A bold, geometric, and modern design system inspired by the word puzzle theme.
 * Features animated backgrounds, glass-morphism, and rich gradients.
 * 
 * @version 3.0
 * @updated December 2025
 */

/* ==================== Font Imports ==================== */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

/* ==================== CSS Variables - Design Tokens ==================== */
:root {
    /* Brand Colors */
    --brand-primary: #4A90E2;
    --brand-primary-light: #6BA8F0;
    --brand-primary-dark: #3A7BC8;
    --brand-secondary: #50E3C2;
    --brand-secondary-dark: #3BC9A8;
    
    /* Shape/Difficulty Colors - Core Identity (from EDGEWORDS_THEME.md) */
    --triangle-color: #6EBF8B;    /* Easy - Success Green */
    --triangle-dark: #5AAF78;
    --square-color: #4A90E2;      /* Medium - Info Blue */
    --square-dark: #3A7BC8;
    --pentagon-color: #FFC107;    /* Hard - Warning Yellow */
    --pentagon-dark: #E6AC00;
    --hexagon-color: #D0021B;     /* Expert - Error Red */
    --hexagon-dark: #B00117;
    
    /* Semantic Colors (from EDGEWORDS_THEME.md) */
    --color-success: #6EBF8B;     /* Success Green */
    --color-error: #D0021B;       /* Error Red */
    --color-warning: #FFC107;     /* Warning Yellow */
    --color-info: #4A90E2;        /* Info Blue */
    
    /* Light Theme (from EDGEWORDS_THEME.md) */
    --bg-primary: #FFFFFF;        /* Background */
    --bg-secondary: #F4F4F4;      /* Surface */
    --bg-card: #FFFFFF;
    --bg-elevated: #FFFFFF;
    --text-primary: #333333;      /* Text Primary */
    --text-secondary: #666666;    /* Text Secondary */
    --text-tertiary: #666666;     /* Text Secondary (tertiary uses same) */
    --border-color: rgba(0, 0, 0, 0.08);
    --border-color-strong: rgba(0, 0, 0, 0.12);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-blur: 20px;
    
    /* Gradients */
    --gradient-brand: linear-gradient(135deg, #4A90E2 0%, #50E3C2 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-warm: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-cool: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-dark: linear-gradient(135deg, #1a1c2c 0%, #2d3748 100%);
    --gradient-mesh: radial-gradient(at 40% 20%, hsla(212,100%,74%,0.3) 0px, transparent 50%),
                     radial-gradient(at 80% 0%, hsla(166,100%,72%,0.3) 0px, transparent 50%),
                     radial-gradient(at 0% 50%, hsla(340,100%,76%,0.2) 0px, transparent 50%),
                     radial-gradient(at 80% 50%, hsla(212,100%,76%,0.2) 0px, transparent 50%),
                     radial-gradient(at 0% 100%, hsla(166,100%,76%,0.3) 0px, transparent 50%);
    
    /* Typography */
    --font-heading: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-family: var(--font-body);  /* Default/legacy alias */
    --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    
    /* Spacing Scale */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 32px;
    --space-8: 40px;
    --space-9: 48px;
    --space-10: 64px;
    --space-11: 80px;
    --space-12: 96px;
    --space-13: 128px;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.16), 0 8px 16px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 0 40px rgba(74, 144, 226, 0.3);
    --shadow-glow-lg: 0 0 80px rgba(74, 144, 226, 0.4);
    
    /* Animation */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    background-image: var(--gradient-mesh);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background applied directly to body - no pseudo-elements to avoid browser dialog interference */

/* ==================== Typography System ==================== */

/* Display Styles - Hero and major headings */
.display-large {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.display-medium {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.display-small {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--text-primary);
}

/* Headline Styles */
.headline-large {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--text-primary);
}

.headline-medium {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    line-height: 1.4;
    font-weight: 600;
    color: var(--text-primary);
}

/* Title Styles */
.title-large {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-primary);
}

.title-medium {
    font-family: var(--font-heading);
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-primary);
}

/* Body Styles */
.body-large {
    font-size: 1.125rem;
    line-height: 1.7;
    font-weight: 400;
    color: var(--text-secondary);
}

.body-medium {
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 400;
    color: var(--text-secondary);
}

.body-small {
    font-size: 0.875rem;
    line-height: 1.5;
    font-weight: 400;
    color: var(--text-tertiary);
}

/* Label Styles */
.label-large {
    font-size: 0.875rem;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.label-medium {
    font-size: 0.75rem;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

/* ==================== Layout & Container ==================== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.section {
    padding: var(--space-12) 0;
    position: relative;
}

/* ==================== Header / Navigation ==================== */
.edgewords-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 72px;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--duration-normal) var(--ease-out);
}

.edgewords-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.header-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.01em;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    transition: all var(--duration-fast) var(--ease-out);
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.nav-link:hover {
    color: var(--brand-primary);
    background: rgba(74, 144, 226, 0.08);
}

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

.nav-link-primary {
    background: var(--gradient-brand) !important;
    color: white !important;
    font-weight: 600;
    padding: var(--space-2) var(--space-5);
    box-shadow: var(--shadow-sm), 0 0 20px rgba(74, 144, 226, 0.3);
}

.nav-link-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md), 0 0 30px rgba(74, 144, 226, 0.4);
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-md);
    transition: all var(--duration-fast) var(--ease-out);
}

.mobile-menu-toggle:hover {
    background: var(--bg-secondary);
}

.mobile-nav {
    display: none;
    flex-direction: column;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--duration-slow) var(--ease-out);
}

.mobile-nav.active {
    max-height: 400px;
    padding: var(--space-4) 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-6);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: background var(--duration-fast) var(--ease-out);
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.mobile-nav-link:hover {
    background: var(--bg-secondary);
}

.mobile-nav-link i {
    font-size: 1.25rem;
    width: 24px;
    color: var(--text-tertiary);
}

.mobile-nav-link-primary {
    background: var(--gradient-brand) !important;
    color: white !important;
    margin: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    width: calc(100% - 32px);
    justify-content: center;
}

.mobile-nav-link-primary i {
    color: white;
}

/* ==================== Hero Section ==================== */
.hero {
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-12) var(--space-6);
    position: relative;
    overflow: hidden;
}

/* Animated gradient orbs */
.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    top: -200px;
    right: -200px;
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(80, 227, 194, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -150px;
    left: -150px;
    animation: float 25s ease-in-out infinite reverse;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(30px, -30px) rotate(5deg); }
    50% { transform: translate(0, -50px) rotate(0deg); }
    75% { transform: translate(-30px, -30px) rotate(-5deg); }
}

.hero-content {
    max-width: 720px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero h1 {
    margin-bottom: var(--space-6);
}

.hero p {
    margin-bottom: var(--space-8);
}

.hero-cta,
.cta-buttons {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

/* ==================== Buttons ==================== */
.btn,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    min-height: 48px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--duration-normal) var(--ease-spring);
    position: relative;
    overflow: hidden;
}

.btn-primary,
.button-primary {
    background: var(--gradient-brand);
    color: white;
    box-shadow: var(--shadow-md), 0 4px 20px rgba(74, 144, 226, 0.3);
}

.btn-primary:hover:not(:disabled),
.button-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), 0 8px 30px rgba(74, 144, 226, 0.4);
}

.btn-primary:active,
.button-primary:active {
    transform: translateY(-1px);
}

.btn-primary:disabled,
.button-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary,
.button-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--border-color-strong);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled),
.button-secondary:hover:not(:disabled) {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-large {
    padding: var(--space-4) var(--space-8);
    font-size: 1rem;
    min-height: 56px;
    border-radius: var(--radius-xl);
}

.btn-small,
.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: 0.8125rem;
    min-height: 36px;
}

/* ==================== Cards ==================== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-7);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.card p {
    text-align: justify;
}

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

.card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.card-title i {
    color: var(--brand-primary);
}

.card-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Feature Cards with Shape Theme */
.feature-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-7);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    transition: all var(--duration-normal) var(--ease-spring);
    box-shadow: var(--shadow-md);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--triangle-color);
    transition: height var(--duration-normal) var(--ease-out);
    pointer-events: none;
}

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

.feature-card:hover::before {
    height: 6px;
}

.feature-card[data-shape="triangle"]::before { background: var(--triangle-color); }
.feature-card[data-shape="square"]::before { background: var(--square-color); }
.feature-card[data-shape="pentagon"]::before { background: var(--pentagon-color); }
.feature-card[data-shape="hexagon"]::before { background: var(--hexagon-color); }
.feature-card[data-shape="octagon"]::before { background: var(--octagon-color); }

.feature-card p {
    text-align: justify;
}

/* ==================== Badges ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px var(--space-3);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: var(--radius-full);
    border: 1.5px solid transparent;
}

.badge-triangle {
    background: rgba(110, 191, 139, 0.15);
    color: var(--triangle-dark);
    border-color: var(--triangle-color);
}

.badge-square {
    background: rgba(74, 144, 226, 0.15);
    color: var(--square-dark);
    border-color: var(--square-color);
}

.badge-pentagon {
    background: rgba(255, 193, 7, 0.15);  /* Warning Yellow at 15% */
    color: #B8860B;                        /* Dark gold for readability */
    border-color: var(--pentagon-color);
}

.badge-hexagon {
    background: rgba(208, 2, 27, 0.15);   /* Error Red at 15% */
    color: var(--hexagon-dark);
    border-color: var(--hexagon-color);
}

.badge-primary {
    background: rgba(74, 144, 226, 0.15);
    color: var(--brand-primary-dark);
    border-color: var(--brand-primary);
}

.badge-success {
    background: rgba(110, 191, 139, 0.15);  /* Success Green at 15% */
    color: #3D7A53;  /* Dark success for text */
    border-color: var(--color-success);
}

.badge-warning {
    background: rgba(255, 193, 7, 0.15);    /* Warning Yellow at 15% */
    color: #B8860B;  /* Dark gold for text */
    border-color: var(--color-warning);
}

/* ==================== Forms ==================== */
.input,
.form-control {
    width: 100%;
    padding: var(--space-4);
    min-height: 56px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    transition: all var(--duration-fast) var(--ease-out);
    outline: none;
}

.input:hover,
.form-control:hover {
    background: var(--bg-card);
    border-color: var(--border-color-strong);
}

.input:focus,
.form-control:focus {
    background: var(--bg-card);
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.15);
}

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

.label,
.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

/* ==================== Alerts ==================== */
.alert {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
    border: 1px solid transparent;
}

.alert-success {
    background: rgba(110, 191, 139, 0.1);  /* Success Green at 10% */
    border-color: var(--color-success);
    color: #3D7A53;  /* Darker success for text */
}

.alert-error,
.alert-danger {
    background: rgba(208, 2, 27, 0.1);     /* Error Red at 10% */
    border-color: var(--color-error);
    color: #8B0012;  /* Darker error for text */
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);    /* Warning Yellow at 10% */
    border-color: var(--color-warning);
    color: #8B6914;  /* Dark gold for text */
}

.alert-info {
    background: rgba(74, 144, 226, 0.1);   /* Info Blue at 10% */
    border-color: var(--color-info);
    color: #2A5A8A;  /* Darker info for text */
}

/* ==================== Loading / Spinner ==================== */
.spinner-border {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2.5px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

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

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
}

/* ==================== Auth Pages ==================== */

/* New Auth Page Layout (with header/footer) */
.auth-page-container {
    max-width: 480px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-5);
}

.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    padding: var(--space-8);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-brand);
    pointer-events: none;
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-7);
}

.auth-header h1 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.5;
}

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

.auth-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-5);
    font-size: 1.75rem;
}

.auth-icon.primary {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.15) 0%, rgba(80, 227, 194, 0.15) 100%);
    color: var(--brand-primary);
}

.auth-icon.success {
    background: rgba(110, 191, 139, 0.15);  /* Success Green at 15% */
    color: var(--color-success);
}

.auth-divider {
    text-align: center;
    margin: var(--space-6) 0;
    color: var(--text-tertiary);
    font-size: 0.875rem;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    border-top: 1px solid var(--border-color);
}

/* Social Login Buttons */
.social-login-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-2);
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    width: 100%;
    padding: var(--space-4) var(--space-5);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    font-family: inherit;
}

.btn-social:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-social svg {
    flex-shrink: 0;
}

/* Google Button */
.btn-google {
    background: white;
    color: #3c4043;
    border-color: #dadce0;
}

.btn-google:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #dadce0;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.15);
}

.btn-google:active:not(:disabled) {
    background: #f1f3f4;
}

/* Facebook Button */
.btn-facebook {
    background: #1877f2;
    color: white;
    border-color: #1877f2;
}

.btn-facebook:hover:not(:disabled) {
    background: #166fe5;
    border-color: #166fe5;
}

.btn-facebook:active:not(:disabled) {
    background: #1469d8;
}

.auth-divider span {
    background: var(--bg-card);
    padding: 0 var(--space-4);
    position: relative;
    z-index: 1;
}

.auth-link {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: var(--space-4);
}

.auth-link a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--duration-fast);
}

.auth-link a:hover {
    color: var(--brand-primary-dark);
    text-decoration: underline;
}

.auth-info-box {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.08) 0%, rgba(80, 227, 194, 0.08) 100%);
    border-left: 4px solid var(--brand-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-bottom: var(--space-6);
    text-align: left;
}

.auth-info-box h4 {
    color: var(--brand-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.auth-info-box p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

.auth-info-box ol {
    margin: 0;
    padding-left: var(--space-5);
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.8;
}

.auth-info-box li {
    margin-bottom: var(--space-1);
}

/* Form helpers */
.form-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: var(--space-2);
}

.password-requirements {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin-top: var(--space-2);
}

.password-requirements .requirement {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: var(--space-1) 0;
}

/* Legacy auth-container (for backwards compatibility) */
.auth-container {
    max-width: 480px;
    width: 100%;
    margin: var(--space-11) auto;
    padding: var(--space-9);
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-brand);
    pointer-events: none;
}

.logo-section {
    text-align: center;
    margin-bottom: var(--space-8);
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: inline-block;
    letter-spacing: -0.02em;
}

.logo:hover {
    opacity: 0.9;
}

.logo-subtitle {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    margin-top: var(--space-1);
}

.link-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: var(--space-4);
}

.link-text a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--duration-fast);
}

.link-text a:hover {
    color: var(--brand-primary-dark);
    text-decoration: underline;
}

/* Auth page responsive */
@media (max-width: 520px) {
    .auth-page-container {
        padding: var(--space-5) var(--space-4);
    }
    
    .auth-card {
        padding: var(--space-6);
        border-radius: var(--radius-xl);
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
    
    .auth-icon {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }
}

/* ==================== Profile Page ==================== */
.profile-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-6);
}

/* Top Section: Profile Info + Edit Form Side by Side */
.profile-top-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

/* Left Card: Identity */
.profile-identity-card {
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

#profileHeader {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    width: 100%;
}

.profile-avatar-wrapper {
    flex-shrink: 0;
}

.profile-avatar-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-lg), 0 0 0 3px white;
    background: var(--bg-secondary);
}

.profile-avatar-fallback {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--gradient-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    box-shadow: var(--shadow-lg), 0 0 0 3px white;
}

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

.profile-name {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
    line-height: 1.2;
}

.profile-tagline {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: var(--space-4);
    line-height: 1.4;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
}

.profile-email {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

.profile-email i {
    font-size: 0.875rem;
}

.verification-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.verification-badge.verified {
    background: rgba(110, 191, 139, 0.1);   /* Success Green at 10% */
    color: var(--color-success);
}

.verification-badge.unverified {
    background: rgba(208, 2, 27, 0.1);      /* Error Red at 10% */
    color: var(--color-error);
}

/* Right Card: Actions */
.profile-actions-card {
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    padding: var(--space-7);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.profile-edit-section {
    flex: 1;
}

.profile-section-title {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-5);
}

.profile-section-title i {
    font-size: 1.25rem;
    color: var(--brand-primary);
}

.profile-section-subtitle {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

.profile-section-subtitle i {
    font-size: 1rem;
    color: var(--text-tertiary);
}

.form-group {
    margin-bottom: var(--space-4);
}

.btn-block {
    width: 100%;
}

.profile-security-section {
    border-top: 1px solid var(--border-color);
    padding-top: var(--space-5);
    margin-top: var(--space-5);
}

/* Statistics Section */
.profile-stats-section,
.profile-shapes-section {
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    padding: var(--space-7);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    margin-bottom: var(--space-6);
}

/* Stats Grid - 4 columns on desktop */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
}

/* Stat Tile - Card-style stat display */
.stat-tile {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    text-align: center;
    transition: transform var(--duration-fast) var(--ease-out), 
                box-shadow var(--duration-fast) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.stat-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent);
    pointer-events: none;
}

.stat-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-tile-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
}

.stat-tile-icon i {
    font-size: 1.25rem;
    color: white;
}

.stat-tile-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-mono);
    line-height: 1.2;
    margin-bottom: var(--space-2);
}

.stat-tile-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

/* Shapes Grid - 4 columns */
.shapes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
}

/* Shape Tile - Visual shape card */
.shape-tile {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    text-align: center;
    border-left: 4px solid var(--shape-color);
    transition: transform var(--duration-fast) var(--ease-out),
                box-shadow var(--duration-fast) var(--ease-out);
}

.shape-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.shape-tile-icon {
    font-size: 2rem;
    color: var(--shape-color);
    margin-bottom: var(--space-3);
}

.shape-tile-count {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: var(--space-2);
}

.shape-tile-name {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--shape-color);
}

/* Responsive adjustments for profile page */
@media (max-width: 900px) {
    .profile-top-section {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .shapes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .profile-container {
        padding: var(--space-5) var(--space-4);
    }
    
    #profileHeader {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-meta {
        justify-content: center;
    }
    
    .profile-identity-card,
    .profile-actions-card,
    .profile-stats-section,
    .profile-shapes-section {
        padding: var(--space-5);
        border-radius: var(--radius-xl);
    }
    
    .profile-avatar-img,
    .profile-avatar-fallback {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .profile-name {
        font-size: 1.5rem;
    }
    
    .stat-tile {
        padding: var(--space-4);
    }
    
    .stat-tile-icon {
        width: 40px;
        height: 40px;
    }
    
    .stat-tile-icon i {
        font-size: 1rem;
    }
    
    .stat-tile-value {
        font-size: 1.5rem;
    }
    
    .shape-tile {
        padding: var(--space-4);
    }
    
    .shape-tile-icon {
        font-size: 1.5rem;
    }
    
    .shape-tile-count {
        font-size: 1.5rem;
    }
}

/* ==================== News Page ==================== */
.news-container {
    max-width: 1000px;
    margin: var(--space-9) auto;
    padding: 0 var(--space-6);
}

.page-header {
    text-align: center;
    margin-bottom: var(--space-10);
    padding-top: var(--space-8);
}

.page-header h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
}

.page-header h1 i {
    -webkit-text-fill-color: initial;
    background: none;
    color: var(--brand-primary);
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.news-post {
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    margin-bottom: var(--space-7);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.news-header {
    display: flex;
    gap: var(--space-5);
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--border-color);
}

.news-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-brand);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.news-meta {
    flex: 1;
}

.news-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    line-height: 1.3;
}

.news-date {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.news-date i {
    color: var(--brand-primary);
}

.news-content {
    line-height: 1.8;
    color: var(--text-secondary);
}

.news-content h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: var(--space-8);
    margin-bottom: var(--space-4);
    padding-top: var(--space-6);
    border-top: 1px solid var(--border-color);
}

.news-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: var(--space-6);
    margin-bottom: var(--space-3);
}

.news-content p {
    margin-bottom: var(--space-4);
}

.news-content ul,
.news-content ol {
    margin-bottom: var(--space-4);
    padding-left: var(--space-6);
}

.news-content li {
    margin-bottom: var(--space-2);
}

.news-content a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--duration-fast);
}

.news-content a:hover {
    color: var(--brand-primary-dark);
    text-decoration: underline;
}

.highlight-box {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.08) 0%, rgba(80, 227, 194, 0.08) 100%);
    border-left: 4px solid var(--brand-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin: var(--space-6) 0;
}

.highlight-box h4 {
    color: var(--brand-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-2);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.highlight-box p {
    margin-bottom: 0;
    color: var(--text-secondary);
}

.coming-soon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
    margin: var(--space-6) 0;
}

.coming-soon-item {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all var(--duration-normal) var(--ease-out);
}

.coming-soon-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.coming-soon-item i {
    font-size: 2.5rem;
    color: var(--brand-primary);
    margin-bottom: var(--space-3);
    display: block;
}

.coming-soon-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.coming-soon-item p {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-bottom: var(--space-3);
}

/* ==================== Legal Pages ==================== */
.legal-container {
    max-width: 1000px;
    margin: var(--space-9) auto;
    padding: var(--space-9);
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.legal-header {
    text-align: center;
    margin-bottom: var(--space-9);
    padding-bottom: var(--space-7);
    border-bottom: 1px solid var(--border-color);
}

.legal-header h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-3);
}

.legal-content h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: var(--space-9);
    margin-bottom: var(--space-4);
}

.legal-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: var(--space-6);
    margin-bottom: var(--space-3);
}

.legal-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-4);
}

.legal-content ul,
.legal-content ol {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-4);
    padding-left: var(--space-6);
}

.legal-content li {
    margin-bottom: var(--space-2);
}

.legal-content a {
    color: var(--brand-primary);
    text-decoration: none;
}

.legal-content a:hover {
    text-decoration: underline;
}

/* ==================== Features Grid ==================== */
.features {
    padding: var(--space-12) 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
}

/* Icon Container */
.icon-container {
    width: 72px;
    height: 72px;
    margin: 0 auto var(--space-5);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.icon-container.primary {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.15) 0%, rgba(80, 227, 194, 0.15) 100%);
    color: var(--brand-primary);
}

.icon-container.success {
    background: rgba(110, 191, 139, 0.15);  /* Success Green at 15% */
    color: var(--color-success);
}

/* ==================== Stats Section ==================== */
.stats {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: var(--space-11) 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-8);
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: var(--font-mono);
    margin-bottom: var(--space-2);
}

/* ==================== Footer ==================== */
.edgewords-footer {
    background: var(--gradient-dark);
    color: white;
    padding: var(--space-11) 0 var(--space-7);
    position: relative;
}

.edgewords-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    pointer-events: none;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-9);
    margin-bottom: var(--space-9);
}

.footer-brand {
    max-width: 300px;
}

.footer-logo-text {
    font-family: var(--font-heading) !important;
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-4) !important;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9375rem;
    line-height: 1.7;
}

.footer-links h4 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-5);
}

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

.footer-links li {
    margin-bottom: var(--space-3);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color var(--duration-fast);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-7);
    text-align: center;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

.footer-copyright a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
}

.footer-copyright a:hover {
    color: white;
    text-decoration: underline;
}

/* ==================== Utility Classes ==================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.justify-center { justify-content: center; }
.items-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }

.gap-1 { gap: var(--space-2); }
.gap-2 { gap: var(--space-4); }
.gap-3 { gap: var(--space-6); }
.gap-4 { gap: var(--space-8); }

.mt-1 { margin-top: var(--space-2); }
.mt-2 { margin-top: var(--space-4); }
.mt-3 { margin-top: var(--space-6); }
.mt-4 { margin-top: var(--space-8); }

.mb-1 { margin-bottom: var(--space-2); }
.mb-2 { margin-bottom: var(--space-4); }
.mb-3 { margin-bottom: var(--space-6); }
.mb-4 { margin-bottom: var(--space-8); }

.me-1 { margin-right: var(--space-1); }
.me-2 { margin-right: var(--space-2); }
.ms-2 { margin-left: var(--space-2); }

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 calc(var(--space-4) * -1);
}

.col-lg-4 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 var(--space-4);
}

.col-lg-8 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 var(--space-4);
}

/* ==================== Animations ==================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--duration-slow) var(--ease-out),
                transform var(--duration-slow) var(--ease-out);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Page Container */
.page-container {
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    max-width: 1200px;
    width: 100%;
    margin: var(--space-11) auto;
    padding: var(--space-9);
    border: 1px solid var(--border-color);
}

/* ==================== Responsive Design ==================== */

/* Desktop/Large screens */
@media (min-width: 1024px) {
    .col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    
    .col-lg-8 {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-brand {
        grid-column: span 2;
        max-width: 100%;
        margin-bottom: var(--space-4);
    }
}

/* Mobile */
@media (max-width: 768px) {
    body {
        padding-top: 72px;
    }
    
    .section {
        padding: var(--space-10) 0;
    }
    
    .hero {
        min-height: auto;
        padding: var(--space-10) var(--space-4);
    }
    
    .display-large {
        font-size: 2rem;
    }
    
    .display-medium {
        font-size: 1.75rem;
    }
    
    .display-small {
        font-size: 1.5rem;
    }
    
    .headline-large {
        font-size: 1.25rem;
    }
    
    .desktop-nav {
        display: none !important;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-nav {
        display: flex;
    }
    
    .header-content {
        padding: 0 var(--space-4);
    }
    
    .container {
        padding: 0 var(--space-4);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
    
    .footer-brand {
        grid-column: 1;
    }
    
    .news-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .news-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .news-title {
        font-size: 1.25rem;
    }
    
    .coming-soon-grid {
        grid-template-columns: 1fr;
    }
    
    .shape-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .btn-large {
        width: 100%;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-cta .btn {
        width: 100%;
        max-width: 280px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .auth-container,
    .page-container {
        padding: var(--space-6);
        margin: var(--space-4);
        border-radius: var(--radius-lg);
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .stat-grid {
        grid-template-columns: 1fr;
    }
    
    .legal-container {
        padding: var(--space-6);
        margin: var(--space-4);
    }
    
    .news-container {
        padding: 0 var(--space-4);
    }
    
    .news-post {
        padding: var(--space-6);
    }
}

/* ==================== Accessibility ==================== */
*:focus-visible {
    outline: 3px solid var(--brand-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.btn:focus-visible,
.button:focus-visible {
    outline-offset: 4px;
}

.skip-link {
    position: absolute;
    top: -50px;
    left: var(--space-4);
    background: var(--brand-primary);
    color: white;
    padding: var(--space-3) var(--space-5);
    text-decoration: none;
    border-radius: var(--radius-md);
    z-index: 200;
    font-weight: 600;
    transition: top var(--duration-fast);
}

.skip-link:focus {
    top: var(--space-4);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==================== Print Styles ==================== */
@media print {
    .edgewords-header,
    .edgewords-footer,
    .btn,
    .button {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    body::before,
    body::after {
        display: none !important;
    }
}
