/* =============================================================================
   Creature Clash Website Styles
   ============================================================================= */

/* CSS Variables */
:root {
    /* Colors - Match app theme */
    --color-primary: #8B5CF6;      /* Purple */
    --color-primary-dark: #7C3AED;
    --color-secondary: #F59E0B;    /* Amber/Gold */
    --color-accent: #22C55E;       /* Green */

    --color-bg: #0F172A;           /* Dark blue-gray */
    --color-bg-light: #1E293B;
    --color-bg-card: #334155;

    --color-text: #F8FAFC;
    --color-text-muted: #94A3B8;
    --color-text-dark: #1E293B;

    /* Typography */
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-heading: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Container */
    --container-max: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

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

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

img {
    max-width: 100%;
    height: auto;
}

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

/* =============================================================================
   Header & Navigation
   ============================================================================= */

.header {
    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 rgba(255, 255, 255, 0.1);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    text-decoration: none;
    color: var(--color-text);
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
}

.nav-links a {
    color: var(--color-text-muted);
    font-weight: 500;
    transition: color 0.2s ease;
}

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

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

.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, #6D28D9 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text);
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
}

.btn-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-text);
    background: rgba(139, 92, 246, 0.1);
}

/* =============================================================================
   Hero Section
   ============================================================================= */

.hero {
    padding-top: 120px;
    padding-bottom: var(--spacing-2xl);
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-light) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
    transform: translateY(-50%);
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-secondary) 50%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-lg);
    line-height: 1.7;
}

.element-badges {
    display: flex;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.element-badge {
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.element-badge.stone {
    background: linear-gradient(135deg, #78716C 0%, #57534E 100%);
    color: #FEF3C7;
    box-shadow: 0 2px 10px rgba(120, 113, 108, 0.4);
}

.element-badge.nature {
    background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(34, 197, 94, 0.4);
}

.element-badge.water {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.4);
}

.element-badge.fire {
    background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(249, 115, 22, 0.4);
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.hero-badge img {
    height: 48px;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.hero-badge:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.hero-image {
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.3) 0%, rgba(139, 92, 246, 0.1) 50%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
}

.hero-image img {
    max-width: 320px;
    border-radius: var(--radius-xl);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6), 0 0 100px rgba(245, 158, 11, 0.2);
    animation: float 6s ease-in-out infinite;
}

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

/* =============================================================================
   Features Section
   ============================================================================= */

.features {
    padding: var(--spacing-2xl) 0;
    background: var(--color-bg-light);
    position: relative;
    overflow: hidden;
}

/* Floating Eggs Decoration */
.floating-eggs {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.floating-egg {
    position: absolute;
    opacity: 0.08;
    filter: blur(1px);
}

.floating-egg.egg-1 {
    width: 120px;
    top: 5%;
    left: 5%;
    animation: floatEgg 8s ease-in-out infinite;
}

.floating-egg.egg-2 {
    width: 100px;
    top: 60%;
    right: 8%;
    animation: floatEgg 10s ease-in-out infinite 1s;
}

.floating-egg.egg-3 {
    width: 90px;
    bottom: 10%;
    left: 10%;
    animation: floatEgg 9s ease-in-out infinite 2s;
}

.floating-egg.egg-4 {
    width: 110px;
    top: 30%;
    right: 3%;
    animation: floatEgg 11s ease-in-out infinite 0.5s;
}

@keyframes floatEgg {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

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

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--spacing-lg);
}

.feature-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    padding: var(--spacing-xl) var(--spacing-lg);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2);
}

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

.feature-creature {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: var(--spacing-md);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-creature {
    transform: scale(1.1) translateY(-5px);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
}

.feature-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* =============================================================================
   Cards Showcase Section
   ============================================================================= */

.cards-showcase {
    padding: var(--spacing-2xl) 0;
    background: var(--color-bg);
    text-align: center;
}

.section-subtitle {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    margin-top: calc(-1 * var(--spacing-lg));
    margin-bottom: var(--spacing-xl);
}

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

.cards-grid img {
    width: 140px;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 40px rgba(139, 92, 246, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cards-grid img:hover {
    transform: scale(1.08) translateY(-8px) rotate(2deg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 60px rgba(139, 92, 246, 0.2);
}

/* =============================================================================
   Screenshots Section
   ============================================================================= */

.screenshots {
    padding: var(--spacing-2xl) 0;
    background: linear-gradient(180deg, var(--color-bg-light) 0%, var(--color-bg) 50%, var(--color-bg-light) 100%);
    overflow: hidden;
}

.screenshot-scroll {
    display: flex;
    gap: var(--spacing-lg);
    overflow-x: auto;
    padding: var(--spacing-xl) var(--spacing-md);
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
}

.screenshot-scroll::-webkit-scrollbar {
    height: 8px;
}

.screenshot-scroll::-webkit-scrollbar-track {
    background: var(--color-bg-card);
    border-radius: 4px;
}

.screenshot-scroll::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 4px;
}

.screenshot-scroll img {
    flex-shrink: 0;
    width: 220px;
    height: auto;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 60px rgba(139, 92, 246, 0.15);
    scroll-snap-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.screenshot-scroll img:hover {
    transform: scale(1.05) translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 80px rgba(139, 92, 246, 0.25);
}

/* =============================================================================
   Download Section
   ============================================================================= */

.download {
    padding: var(--spacing-2xl) 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 50%, #4C1D95 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.download::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

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

.download-content h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: var(--spacing-xs);
}

.download-content p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: var(--spacing-lg);
}

.store-badges {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
}

.store-badge img {
    height: 54px;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.store-badge:hover img {
    transform: scale(1.08) translateY(-3px);
    filter: brightness(1.1);
}

/* =============================================================================
   Footer
   ============================================================================= */

.footer {
    background: var(--color-bg);
    padding: var(--spacing-lg) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

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

.footer-copyright {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.footer-note {
    font-size: 0.75rem;
    margin-top: var(--spacing-xs);
    opacity: 0.7;
}

/* =============================================================================
   Legal Pages (Privacy, Terms)
   ============================================================================= */

.legal-page {
    padding-top: 100px;
    padding-bottom: var(--spacing-2xl);
    min-height: 100vh;
}

.legal-page h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.last-updated {
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-xl);
}

.legal-page section {
    margin-bottom: var(--spacing-xl);
}

.legal-page h2 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
}

.legal-page h3 {
    font-size: 1.15rem;
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-xs);
}

.legal-page p {
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-sm);
}

.legal-page ul, .legal-page ol {
    color: var(--color-text-muted);
    margin-left: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
}

.legal-page li {
    margin-bottom: var(--spacing-xs);
}

/* =============================================================================
   Support Page
   ============================================================================= */

.support-page {
    padding-top: 100px;
    padding-bottom: var(--spacing-2xl);
    min-height: 100vh;
}

.support-page h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.support-intro {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-xl);
}

/* Contact Section */
.contact-section {
    margin-bottom: var(--spacing-2xl);
}

.contact-section h2 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
}

.contact-card {
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
}

.contact-method {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
}

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

.contact-method h3 {
    margin-bottom: var(--spacing-xs);
}

.contact-method p {
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-xs);
}

.contact-link {
    font-size: 1.1rem;
    font-weight: 600;
}

.response-time {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* FAQ Section */
.faq-section {
    margin-bottom: var(--spacing-2xl);
}

.faq-section > h2 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-lg);
}

.faq-category {
    margin-bottom: var(--spacing-xl);
}

.faq-category h3 {
    font-size: 1.15rem;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-xs);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-item {
    background: var(--color-bg-light);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-xs);
    overflow: hidden;
}

.faq-item summary {
    padding: var(--spacing-sm) var(--spacing-md);
    cursor: pointer;
    font-weight: 500;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--color-text-muted);
    transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item p, .faq-item ul, .faq-item ol {
    padding: 0 var(--spacing-md) var(--spacing-md);
    color: var(--color-text-muted);
}

.faq-item ul, .faq-item ol {
    margin-left: var(--spacing-md);
}

.faq-item li {
    margin-bottom: var(--spacing-xs);
}

/* Still Need Help */
.still-need-help {
    text-align: center;
    background: var(--color-bg-light);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
}

.still-need-help h2 {
    margin-bottom: var(--spacing-sm);
}

.still-need-help p {
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-md);
}

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

@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

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

    .element-badges {
        justify-content: center;
    }

    .hero-image {
        order: -1;
    }

    .hero-image img {
        max-width: 260px;
    }

    .nav-links {
        display: none; /* Could add mobile menu later */
    }

    .feature-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .screenshot-scroll img {
        width: 180px;
    }

    .cards-grid img {
        width: 100px;
    }

    .store-badges {
        flex-direction: column;
        align-items: center;
    }

    .footer-links {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .contact-method {
        flex-direction: column;
        text-align: center;
    }

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

@media (min-width: 769px) and (max-width: 1024px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-image img {
        max-width: 280px;
    }
}

@media (min-width: 1025px) {
    .feature-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
