/* ===== CSS VARIABLES ===== */
:root {
    --primary: #3A5EFF;
    --primary-dark: #2A4ECC;
    --secondary: #FF6B35;
    --accent: #FFD700;
    --dark: #1A1A2E;
    --light: #F8F9FF;
    --text: #333;
    --text-light: #666;
    --white: #FFFFFF;
    --gradient-primary: linear-gradient(135deg, #3A5EFF 0%, #667eea 100%);
    --gradient-secondary: linear-gradient(135deg, #FF6B35 0%, #FF8E53 100%);
    --gradient-accent: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    --shadow: 0 10px 30px rgba(58, 94, 255, 0.2);
    --shadow-hover: 0 20px 40px rgba(58, 94, 255, 0.3);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-card-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
    
    /* Theme variables for dynamic animations */
    --theme-primary: #3A5EFF;
    --theme-secondary: #FF6B35;
    --theme-accent: #FFD700;
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text);
    overflow-x: hidden;
    background: var(--light);
}

/* ===== LOADING SCREEN ===== */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    color: var(--white);
}

.loading-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 2rem;
    animation: pulse 2s infinite;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loading p {
    font-size: 1.1rem;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    margin: 3px 0;
    transition: 0.3s;
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    position: relative;
    z-index: 2;
}

.hero-text {
    flex: 1 1 320px;
    min-width: 260px;
    max-width: 480px;
    color: var(--white);
}

.hero-text h1 {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.1;
    animation: slideInLeft 1s ease-out;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.hero-text .subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: slideInLeft 1s ease-out 0.2s both;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 3rem;
    opacity: 0.8;
    animation: slideInLeft 1s ease-out 0.4s both;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    animation: slideInLeft 1s ease-out 0.6s both;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-secondary);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

.hero-visual {
    flex: 1 1 340px;
    min-width: 280px;
    max-width: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.game-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 42, 80, 0.12);
    border-radius: 32px;
    box-shadow: 0 8px 32px rgba(30, 42, 80, 0.18);
    padding: 32px;
    margin: 0 auto;
    max-width: 420px;
    min-width: 320px;
    min-height: 420px;
    transition: background 0.4s;
}

.game-screen {
    background: var(--board-bg, #1e3a8a);
    border-radius: 24px;
    box-shadow: 0 4px 24px rgba(30, 42, 80, 0.18);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background 0.4s;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    gap: 6px;
    width: 320px;
    height: 320px;
    background: var(--board-inner-bg, #233a6a);
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(30, 42, 80, 0.10);
    padding: 10px;
    position: relative;
    transition: background 0.4s;
}

.grid-cell {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--cell-bg, #2d3e6a);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(30, 42, 80, 0.10);
    border: 2px solid var(--cell-border, #3730a3);
    transition: background 0.3s, border 0.3s, box-shadow 0.3s, transform 0.2s;
    position: relative;
    overflow: hidden;
}

.grid-cell.filled {
    background: var(--cell-filled, #00bfae);
    border-color: var(--cell-filled-border, #00bfae);
    box-shadow: 0 2px 8px rgba(0,191,174,0.18), 0 0 0 2px #fff2 inset;
    animation: popIn 0.18s cubic-bezier(.68,-0.55,.27,1.55);
}

@keyframes popIn {
    0% { transform: scale(0.7); }
    80% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

.grid-cell.golden {
    background: linear-gradient(135deg, #ffe082 60%, #ffd700 100%);
    border-color: #ffd700;
    box-shadow: 0 0 16px 4px #ffd70055, 0 2px 8px #ffd70033;
    position: relative;
}

.grid-cell.clearing {
    animation: clearFlash 0.4s cubic-bezier(.68,-0.55,.27,1.55);
    box-shadow: 0 0 16px 4px #fff, 0 2px 8px #fff2;
}

@keyframes clearFlash {
    0% { background: #fff; }
    100% { background: var(--cell-bg, #2d3e6a); }
}

.floating-blocks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-block {
    position: absolute;
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 8px;
    animation: float 6s infinite ease-in-out;
    transition: background-color 0.5s ease;
}

.floating-block:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.floating-block:nth-child(2) { top: 20%; right: 15%; animation-delay: 1s; }
.floating-block:nth-child(3) { bottom: 30%; left: 20%; animation-delay: 2s; }
.floating-block:nth-child(4) { bottom: 20%; right: 10%; animation-delay: 3s; }

/* ===== FEATURES SECTION ===== */
.features {
    padding: 6rem 0;
    background: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.feature-card {
    background: var(--white);
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-card-hover);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 2rem;
    color: var(--white);
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== DOWNLOAD SECTION ===== */
.download {
    padding: 6rem 0;
    background: var(--gradient-primary);
    color: var(--white);
    text-align: center;
}

.download h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.download p {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.download-btn {
    background: var(--gradient-secondary);
    color: var(--white);
    padding: 1.5rem 3rem;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 3rem;
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.download-btn:hover::before {
    left: 100%;
}

.download-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.download-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    opacity: 0.9;
}

.info-item i {
    font-size: 1.3rem;
    color: var(--accent);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.footer-section p, .footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    display: block;
}

.footer-section a:hover {
    color: var(--accent);
}

/* Developer name link styling */
.footer-section a[href*="linkedin"] {
    color: var(--accent);
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.footer-section a[href*="linkedin"]:hover {
    color: var(--white);
    text-shadow: 0 0 10px var(--accent);
}

.footer-section a[href*="linkedin"]::after {
    content: ' ↗';
    font-size: 0.8em;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.footer-section a[href*="linkedin"]:hover::after {
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom i {
    color: #ff6b6b;
}

/* ===== ANIMATIONS ===== */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px var(--accent); }
    50% { box-shadow: 0 0 20px var(--accent), 0 0 30px var(--accent); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* ===== GAME GRID ANIMATIONS ===== */
@keyframes golden-glow {
    0%, 100% { 
        box-shadow: 0 0 5px var(--theme-accent);
        filter: brightness(1);
    }
    50% { 
        box-shadow: 0 0 20px var(--theme-accent), 0 0 30px var(--theme-accent);
        filter: brightness(1.3);
    }
}

@keyframes clearing-animation {
    0% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.3);
        opacity: 0.8;
    }
    100% { 
        transform: scale(0);
        opacity: 0;
    }
}

@keyframes particle-explosion {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(
            calc(cos(var(--angle, 0deg)) * 50px),
            calc(sin(var(--angle, 0deg)) * 50px)
        ) scale(0);
        opacity: 0;
    }
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== PARTICLE EFFECTS ===== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    animation: particle-float 8s infinite linear;
}

@keyframes particle-float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu {
        display: flex;
    }

    .hero-content {
        flex-direction: column;
        align-items: center;
        gap: 32px;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-text .subtitle {
        font-size: 1.2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .game-preview {
        padding: 12px;
        min-width: 0;
        max-width: 98vw;
    }

    .game-grid {
        width: 90vw;
        height: 90vw;
        min-width: 0;
        min-height: 0;
        max-width: 98vw;
        max-height: 98vw;
        padding: 4px;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .download h2 {
        font-size: 2rem;
    }

    .download-info {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .feature-card {
        padding: 2rem 1.5rem;
    }
} 