/* ===== CSS Variables - Heepcar Theme ===== */
:root {
    /* Primary Colors from heepcar.com */
    --primary: hsl(206, 75%, 53%);
    --primary-foreground: hsl(0, 0%, 100%);
    --background: hsl(204, 95%, 94%);
    --foreground: hsl(224, 85%, 5%);
    --secondary: hsl(203, 89%, 86%);
    --accent: hsl(199, 99%, 72%);
    --muted: hsl(200, 99%, 88%);
    --muted-foreground: hsl(0, 2.5%, 16%);
    --border: hsl(201, 97%, 86%);
    --card: hsl(204, 79%, 96%);
    
    /* Spacing */
    --radius: 0.5rem;
    
    /* Font */
    --font-family: 'Poppins', system-ui, -apple-system, sans-serif;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(180deg, #FFFFFF 0%, var(--secondary) 100%);
    color: var(--foreground);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

/* ===== Container ===== */
.container {
    width: 100%;
    max-width: 420px;
    padding: 3rem 1.5rem;
    text-align: center;
    animation: fadeInUp 0.7s ease-out;
}

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

/* ===== Logo ===== */
.logo-container {
    margin-bottom: 2rem;
}

.logo-img {
    width: 200px;
    height: auto;
    margin: 0 auto;
}

/* ===== Tagline ===== */
.tagline {
    font-size: 1.2rem;
    color: var(--muted-foreground);
    margin-bottom: 2.5rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    line-height: 147%;
}

/* ===== Redirect Message ===== */
.redirect-message {
    margin-bottom: 2rem;
    padding: 1rem 1.5rem;
    background: hsl(206, 75%, 53%, 0.1);
    border: 1px solid hsl(206, 75%, 53%, 0.2);
    border-radius: 12px;
    display: none;
}

.redirect-message.active {
    display: block;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.redirect-message p {
    color: var(--primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
    100% { content: ''; }
}

/* ===== Store Buttons ===== */
.store-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.store-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.store-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

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

/* Store Logo */
.store-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 6px;
}

/* Apple Button - Black style like heepcar.com */
.apple-btn {
    background: #111827;
    color: #ffffff;
}

.apple-btn:hover {
    background: #1f2937;
}

/* Google Button - Black style like heepcar.com */
.google-btn {
    background: #111827;
    color: #ffffff;
}

.google-btn:hover {
    background: #1f2937;
}

/* Store Text */
.store-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.store-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
    font-weight: 400;
}

.store-name {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.2;
}

/* ===== Webapp Fallback ===== */
.webapp-fallback {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.webapp-fallback p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
}

.webapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.webapp-btn:hover {
    background: hsl(206, 75%, 45%);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

/* ===== Hidden State for Redirect ===== */
.hidden {
    display: none !important;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .container {
        padding: 2rem 1.25rem;
    }
    
    .logo-img {
        width: 160px;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .store-btn {
        padding: 0.75rem 1.25rem;
    }
    
    .store-name {
        font-size: 1rem;
    }
}

/* ===== Tablet and up ===== */
@media (min-width: 768px) {
    .store-buttons {
        align-items: center;
    }
    
    .store-btn {
        width: 280px;
    }
}

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