/* ===========================
   CSS RESET & BASE
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
}

/* ===========================
   CSS CUSTOM PROPERTIES
   =========================== */
:root {
    /* Colors */
    --color-bg-start: #d9f3ef;
    --color-bg-end: #f0f9f8;
    --color-card-bg: #ffffff;
    --color-primary: #0e2334;
    --color-secondary: #4f6b7b;
    --color-border-light: #e8eff2;
    --color-border-accent: #d8efec;
    
    /* Brand Colors */
    --color-ifood: #ea1d2c;
    --color-keeta: #ffd700;
    --color-99food: #111111;
    
    /* Unit Badge */
    --color-badge-bg: #2a5e5a;
    --color-badge-text: #ffffff;
    
    /* Typography */
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-h1: 28px;
    --font-size-subtitle: 12px;
    --font-size-unit: 15px;
    --font-size-button: 13px;
    --font-size-footer: 12px;
    
    /* Spacing */
    --spacing-xs: 6px;
    --spacing-sm: 10px;
    --spacing-md: 14px;
    --spacing-lg: 18px;
    --spacing-xl: 22px;
    --spacing-2xl: 32px;
    
    /* Border Radius */
    --radius-sm: 12px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 22px;
    --radius-2xl: 28px;
    
    /* Shadows */
    --shadow-card: 0 20px 60px rgba(14, 35, 52, 0.12);
    --shadow-button: 0 6px 16px rgba(0, 0, 0, 0.08);
    --shadow-button-hover: 0 12px 24px;
    --shadow-logo: 0 10px 30px rgba(169, 219, 212, 0.2);
    
    /* Transitions */
    --transition-fast: 0.25s ease;
    --transition-smooth: 0.6s ease-out;
}

/* ===========================
   BODY & LAYOUT
   =========================== */
body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, var(--color-bg-start) 0%, var(--color-bg-end) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 16px;
    color: var(--color-primary);
}

/* ===========================
   CONTAINER
   =========================== */
.container {
    width: 100%;
    max-width: 520px;
    background: var(--color-card-bg);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-card);
    padding: var(--spacing-2xl) 24px;
    animation: slideUp var(--transition-smooth);
}

/* ===========================
   LOADING SKELETON
   =========================== */
.loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
}

.loading-card {
    width: 100%;
    max-width: 520px;
    background: var(--color-card-bg);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-card);
    padding: var(--spacing-2xl) 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.loading-logo {
    width: 96px;
    height: 96px;
    background: linear-gradient(90deg, #eafaf7 25%, #d0f3ef 50%, #eafaf7 75%);
    background-size: 200% 100%;
    border-radius: var(--radius-xl);
    animation: shimmer 1.5s infinite;
}

.loading-bar {
    width: 60%;
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    border-radius: 8px;
    animation: shimmer 1.5s infinite;
}

.loading-bar.short {
    width: 40%;
    height: 14px;
}

.loading-buttons {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: 20px;
}

.loading-button {
    width: 100%;
    height: 48px;
    background: linear-gradient(90deg, #f5f5f5 25%, #ebebeb 50%, #f5f5f5 75%);
    background-size: 200% 100%;
    border-radius: var(--radius-md);
    animation: shimmer 1.5s infinite;
}

/* ===========================
   HEADER
   =========================== */
header {
    text-align: center;
    margin-bottom: 26px;
    padding-top: 8px;
}

.logo {
    width: 104px;
    height: 104px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #eafaf7, #d0f3ef);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-logo);
}

.logo img {
    width: 85%;
    height: auto;
    object-fit: contain;
}

h1 {
    font-size: var(--font-size-h1);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.subtitle {
    font-size: var(--font-size-subtitle);
    color: var(--color-secondary);
    font-weight: 400;
    line-height: 1.5;
}

/* ===========================
   SECTION HEADERS
   =========================== */
.section-header {
    margin-top: 28px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-border-accent);
}

.section-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-header:first-of-type {
    margin-top: 8px;
}

/* ===========================
   UNITS
   =========================== */
.unit {
    margin-top: var(--spacing-md);
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, #f8fefe 0%, #eef9f7 100%);
    border: 1px solid var(--color-border-accent);
    border-radius: var(--radius-lg);
}

.unit-title {
    font-size: var(--font-size-unit);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.unit-badge {
    background: var(--color-badge-bg);
    color: var(--color-badge-text);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.unit-description {
    font-size: var(--font-size-footer);
    color: var(--color-secondary);
    margin-top: var(--spacing-sm);
}

/* ===========================
   BUTTONS
   =========================== */
.buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
}

.btn {
    padding: 14px 12px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: var(--font-size-button);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-button);
}

/* Ripple Effect */
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-text, .btn-icon {
    position: relative;
    z-index: 1;
}

.btn-icon {
    font-size: 16px;
}

/* iFood Button */
.btn-ifood {
    background: var(--color-ifood);
    color: white;
}

.btn-ifood:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-button-hover) rgba(234, 29, 44, 0.25);
}

/* Keeta Button */
.btn-keeta {
    background: linear-gradient(135deg, var(--color-keeta) 0%, #ffed4e 100%);
    color: #333;
}

.btn-keeta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-button-hover) rgba(255, 215, 0, 0.22);
}

/* 99Food Button */
.btn-99 {
    background: var(--color-99food);
    color: #ffffff;
}

.btn-99:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-button-hover) rgba(0, 0, 0, 0.22);
}

/* ===========================
   FOOTER
   =========================== */
footer {
    text-align: center;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border-light);
    font-size: var(--font-size-footer);
    color: var(--color-secondary);
}

/* ===========================
   ANIMATIONS
   =========================== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* ===========================
   ACCESSIBILITY
   =========================== */
*:focus-visible {
    outline: 3px solid #2a5e5a;
    outline-offset: 2px;
}

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

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 420px) {
    .container {
        padding: 24px 18px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .subtitle {
        font-size: 11px;
    }
    
    .btn {
        padding: 12px 14px;
        font-size: 12px;
    }
    
    .logo {
        width: 88px;
        height: 88px;
    }
    
    header {
        margin-bottom: 22px;
        padding-top: 4px;
    }
}

@media (min-width: 768px) {
    body {
        padding: 24px;
    }
}
