/* ==========================================
   CSS Variables and Reset
   ========================================== */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #ec4899;
    --accent-color: #10b981;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow: rgba(0, 0, 0, 0.3);
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    --gradient-2: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    --gradient-3: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================
   Navigation
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 4px 20px var(--shadow);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    overflow: hidden;
}

.ball-animation {
    position: absolute;
    border-radius: 50%;
    background: var(--gradient-1);
    opacity: 0.1;
    animation: float 20s infinite;
}

.ball-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: -10%;
    animation-delay: 0s;
}

.ball-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: -5%;
    animation-delay: 5s;
}

.ball-3 {
    width: 150px;
    height: 150px;
    bottom: 10%;
    left: 50%;
    animation-delay: 10s;
}

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

.hero .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    animation: fadeInUp 1s ease;
}

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

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

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.8;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

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

.btn-secondary:hover {
    background: var(--surface-light);
    border-color: var(--primary-color);
}

/* Phone Mockup */
.hero-image {
    animation: fadeInUp 1s ease 0.3s both;
}

.phone-mockup {
    perspective: 1000px;
}

.phone-frame {
    width: 300px;
    height: 600px;
    background: linear-gradient(145deg, #2d3748, #1a202c);
    border-radius: 40px;
    padding: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    margin: 0 auto;
    transform: rotateY(-10deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.phone-mockup:hover .phone-frame {
    transform: rotateY(0deg) rotateX(0deg);
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-radius: 30px;
    overflow: hidden;
    position: relative;
}

.game-preview {
    width: 100%;
    height: 100%;
    position: relative;
}

.preview-ball {
    position: absolute;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 30% 30%, #ff6b6b, #c92a2a);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.5);
    animation: ballBounce 2s infinite;
}

@keyframes ballBounce {
    0%, 100% {
        top: 50%;
    }
    50% {
        top: 30%;
    }
}

.preview-paddle {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 20px;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.5);
    animation: paddleMove 3s infinite;
}

@keyframes paddleMove {
    0%, 100% {
        left: 50%;
    }
    50% {
        left: 60%;
    }
}

.preview-target {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.target-1 {
    background: radial-gradient(circle at 30% 30%, #fbbf24, #f59e0b);
    top: 15%;
    left: 20%;
    animation: targetFloat 3s infinite;
}

.target-2 {
    background: radial-gradient(circle at 30% 30%, #a78bfa, #7c3aed);
    top: 25%;
    right: 15%;
    animation: targetFloat 3s infinite 1s;
}

.target-3 {
    background: radial-gradient(circle at 30% 30%, #60a5fa, #3b82f6);
    top: 35%;
    left: 35%;
    animation: targetFloat 3s infinite 2s;
}

@keyframes targetFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.preview-score {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.preview-combo {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1rem;
    font-weight: 700;
    color: #fbbf24;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* ==========================================
   Features Section
   ========================================== */
.features {
    padding: 6rem 0;
    background: var(--surface);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
}

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

.feature-card {
    background: var(--background);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: bounce 2s infinite;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.8;
}

/* ==========================================
   How to Play Section
   ========================================== */
.how-to-play {
    padding: 6rem 0;
    background: var(--background);
}

.gameplay-grid {
    display: grid;
    gap: 2rem;
}

.gameplay-item {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    background: var(--surface);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.gameplay-item:hover {
    border-color: var(--primary-color);
    transform: translateX(10px);
}

.gameplay-number {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex-shrink: 0;
}

.gameplay-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.gameplay-content p {
    color: var(--text-muted);
    line-height: 1.8;
}

/* ==========================================
   Game Stats Section
   ========================================== */
.game-stats {
    padding: 4rem 0;
    background: var(--surface);
}

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

.stat-item {
    text-align: center;
    padding: 2rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

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

/* ==========================================
   Download Section
   ========================================== */
.download {
    padding: 6rem 0;
    background: var(--background);
}

.download-card {
    background: var(--surface);
    border-radius: 30px;
    padding: 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.download-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    animation: pulse 4s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.download-content {
    position: relative;
    z-index: 1;
}

.download-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.download-content p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.btn-download {
    background: var(--gradient-2);
    color: white;
    padding: 1.2rem 2.5rem;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.4);
}

.download-info {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

.download-visual {
    position: relative;
    width: 100%;
    height: 300px;
}

.visual-ball {
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle at 30% 30%, #ff6b6b, #c92a2a);
    border-radius: 50%;
    top: 40%;
    left: 40%;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.5);
    animation: visualBallMove 5s infinite;
}

@keyframes visualBallMove {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(50px, -50px);
    }
    50% {
        transform: translate(0, -100px);
    }
    75% {
        transform: translate(-50px, -50px);
    }
}

.visual-target {
    position: absolute;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at 30% 30%, #fbbf24, #f59e0b);
    border-radius: 50%;
    top: 20%;
    right: 30%;
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.5);
    animation: visualTargetFloat 3s infinite;
}

@keyframes visualTargetFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.1);
    }
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    background: var(--surface);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-description {
    color: var(--text-muted);
    line-height: 1.8;
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

.footer-address {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* ==========================================
   Legal Pages
   ========================================== */
.legal-page {
    padding: 100px 0 60px;
    min-height: 100vh;
}

.legal-header {
    text-align: center;
    margin-bottom: 4rem;
}

.legal-header h1 {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.last-updated {
    color: var(--text-muted);
    font-size: 1rem;
}

.legal-content {
    max-width: 900px;
    margin: 0 auto;
}

.legal-section {
    margin-bottom: 3rem;
    background: var(--surface);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.legal-section h2 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.legal-section h3 {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin: 1.5rem 0 1rem;
}

.legal-section p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.legal-section ul {
    margin: 1rem 0 1rem 2rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.legal-section li {
    margin-bottom: 0.5rem;
}

.legal-section a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.legal-section a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.contact-info {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 1rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 968px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image {
        order: -1;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .download-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

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

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: rgba(15, 23, 42, 0.98);
        width: 100%;
        padding: 2rem;
        gap: 1rem;
        transition: left 0.3s ease;
        border-top: 1px solid var(--border);
    }

    .nav-links.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

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

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .legal-header h1 {
        font-size: 2rem;
    }

    .legal-section {
        padding: 1.5rem;
    }

    .phone-frame {
        width: 250px;
        height: 500px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

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

    .download-card {
        padding: 2rem;
    }

    .gameplay-item {
        flex-direction: column;
        text-align: center;
    }

    .stat-number {
        font-size: 2rem;
    }
}

/* ==========================================
   Animations and Utilities
   ========================================== */
.fade-in {
    animation: fadeIn 0.5s ease;
}

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

/* Smooth transitions for all interactive elements */
a, button, .btn, .feature-card, .gameplay-item {
    transition: all 0.3s ease;
}

/* Selection styling */
::selection {
    background: var(--primary-color);
    color: white;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--surface-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}
