/* ============================================
   Puzzle Fest - Liquid Glass Design System
   ============================================ */

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

:root {
    /* Colors */
    --color-primary: #667eea;
    --color-secondary: #764ba2;
    --color-accent: #f093fb;
    --color-success: #4ade80;
    --color-warning: #fbbf24;
    --color-danger: #f87171;
    
    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --glass-hover-bg: rgba(255, 255, 255, 0.12);
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Border Radius - Universal Softness */
    --radius-soft: 1rem; /* rounded-2xl */
    --radius-full: 9999px; /* rounded-full */
    
    /* Transitions */
    --transition-base: cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: var(--font-sans);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
    position: relative;
}

/* === Dynamic Background === */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    z-index: -1;
    animation: gradientShift 15s ease infinite;
}

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

/* === Navigation === */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: var(--spacing-sm) 0;
    backdrop-filter: blur(20px) saturate(180%);
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
}

.logo-icon {
    font-size: 2rem;
}

.brand-name {
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: var(--spacing-xs);
    flex: 1;
    justify-content: center;
}

.nav-link {
    padding: var(--spacing-xs) var(--spacing-md);
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: var(--radius-soft);
    transition: all 0.3s var(--transition-base);
    font-weight: 500;
}

.nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

/* === Buttons === */
.btn-glass {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-soft);
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.4s var(--transition-base);
    box-shadow: var(--glass-shadow);
    text-decoration: none;
}

.btn-glass:hover {
    background: var(--glass-hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.25), inset 0 0 20px rgba(255, 255, 255, 0.15);
}

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

.btn-primary {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4), rgba(118, 75, 162, 0.4));
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.6), rgba(118, 75, 162, 0.6));
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

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

.btn-icon {
    font-size: 1.2em;
}

/* === Hero Section === */
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
    text-align: center;
}

.hero-content {
    margin-bottom: var(--spacing-xl);
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 12px rgba(255, 255, 255, 0.3));
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.hero-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.stat-card {
    padding: var(--spacing-lg);
    border-radius: var(--radius-soft);
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: all 0.4s var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.25);
    background: var(--glass-hover-bg);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

/* === Sections === */
.features,
.popular-puzzles,
.cta-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

.view-all-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s var(--transition-base);
}

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

/* === Features Grid === */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.feature-card {
    padding: var(--spacing-lg);
    border-radius: var(--radius-soft);
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: all 0.4s var(--transition-base);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(31, 38, 135, 0.3);
    background: var(--glass-hover-bg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.feature-title {
    font-size: 1.4rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

.feature-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* === Puzzle Cards === */
.puzzles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-md);
}

.puzzle-card {
    padding: var(--spacing-lg);
    border-radius: var(--radius-soft);
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: all 0.4s var(--transition-base);
    position: relative;
}

.puzzle-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(31, 38, 135, 0.3);
    background: var(--glass-hover-bg);
}

.puzzle-badge {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.difficulty-easy {
    background: rgba(74, 222, 128, 0.3);
    border: 1px solid rgba(74, 222, 128, 0.5);
    color: #4ade80;
}

.difficulty-medium {
    background: rgba(251, 191, 36, 0.3);
    border: 1px solid rgba(251, 191, 36, 0.5);
    color: #fbbf24;
}

.difficulty-hard {
    background: rgba(248, 113, 113, 0.3);
    border: 1px solid rgba(248, 113, 113, 0.5);
    color: #f87171;
}

.puzzle-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

.puzzle-description {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.puzzle-meta {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* === CTA Section === */
.cta-section {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-md);
}

.cta-content {
    padding: var(--spacing-xl);
    border-radius: var(--radius-soft);
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    font-weight: 700;
}

.cta-description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-lg);
}

/* === Footer === */
.footer {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    margin-top: var(--spacing-xl);
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.footer-heading {
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

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

.footer-links li {
    margin-bottom: var(--spacing-xs);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s var(--transition-base);
}

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

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

/* === Responsive Design === */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .features-grid,
    .puzzles-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* === Form Elements === */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-soft);
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    color: white;
    font-size: 1rem;
    transition: all 0.3s var(--transition-base);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: var(--glass-hover-bg);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

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

/* === Container Utility === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
}

.glass-container {
    padding: var(--spacing-xl);
    border-radius: var(--radius-soft);
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

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

.fade-in {
    animation: fadeIn 0.6s var(--transition-base);
}

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

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-soft);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}
