/* ===== CSS Variables ===== */
:root {
    /* Color Scheme - Blue Theme */
    --header-color: #1E5A8E;
    --header-accent: #2B7AB8;
    --background: #F8FAFC;
    --text-primary: #0F172A;
    --text-secondary: #64748B;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    
    /* Typography */
    --font-family: 'Segoe UI', 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-size-xl: 48px;
    --font-size-lg: 22px;
    --font-size-md: 20px;
    --font-size-base: 16px;
    
    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 40px;
    --spacing-xl: 60px;
    
    /* Layout */
    --container-max-width: 1280px;
    --border-radius: 16px;
    --transition-speed: 0.3s;
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: var(--background);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* ===== Header Styles ===== */
.header {
    text-align: center;
    padding: var(--spacing-md) var(--spacing-md);
    background: linear-gradient(135deg, var(--header-color) 0%, var(--header-accent) 100%);
    color: var(--white);
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 10;
}

.header__logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
}

.header__logo {
    height: 55px;
    width: auto;
    mix-blend-mode: screen;
    filter: brightness(1.2) contrast(1.1) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
    background: rgba(255, 255, 255, 0.1);
    padding: 8px;
    border-radius: 8px;
}

.header__title {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--white);
    margin: 0;
}

.header__subtitle {
    font-size: 16px;
    font-weight: 400;
    opacity: 0.9;
    color: var(--white);
}

/* ===== Main Content ===== */
.main {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
    position: relative;
    z-index: 10;
}


/* ===== Chicklet Grid Layout ===== */
.chicklet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chicklet-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .header__logo-container {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .header__logo {
        height: 40px;
    }
    
    .header__title {
        font-size: 28px;
    }
    
    .header__subtitle {
        font-size: 14px;
    }
}

@media (min-width: 1400px) {
    .chicklet-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}


/* ===== Chicklet Card Styles ===== */
.chicklet {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    padding: var(--spacing-lg);
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.4), 0 2px 10px rgba(245, 158, 11, 0.3);
    text-decoration: none;
    color: #FFFFFF;
    font-size: var(--font-size-lg);
    font-weight: 600;
    text-align: center;
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.chicklet__name {
    position: relative;
    z-index: 1;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Animated gradient background for chicklets */
.chicklet::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #9333EA 0%, #7C3AED 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    z-index: 0;
}

/* Animated overlay with moving light effect */
.chicklet::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    animation: rotateGlow 10s linear infinite;
    z-index: 0;
}

/* Gradient shift animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Rotating glow animation */
@keyframes rotateGlow {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


/* ===== Interactive Hover & Transition Effects ===== */
.chicklet:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 8px 30px rgba(251, 191, 36, 0.6), 0 4px 20px rgba(245, 158, 11, 0.5);
    border-color: rgba(0, 0, 0, 0.15);
}

.chicklet:hover::before {
    filter: brightness(1.15) saturate(1.1);
}

.chicklet:active {
    transform: translateY(-2px) scale(1.01);
    box-shadow: var(--shadow-md);
}

/* Smooth cursor feedback */
.chicklet {
    cursor: pointer;
}

/* Focus state for accessibility */
.chicklet:focus {
    outline: 3px solid #A855F7;
    outline-offset: 4px;
}

/* Animation for page load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chicklet {
    animation: fadeInUp 0.6s ease-out backwards;
}

/* Stagger animation for multiple chicklets */
.chicklet:nth-child(1) { animation-delay: 0.1s; }
.chicklet:nth-child(2) { animation-delay: 0.2s; }
.chicklet:nth-child(3) { animation-delay: 0.3s; }
.chicklet:nth-child(4) { animation-delay: 0.4s; }
.chicklet:nth-child(5) { animation-delay: 0.5s; }
.chicklet:nth-child(6) { animation-delay: 0.6s; }
.chicklet:nth-child(7) { animation-delay: 0.7s; }
.chicklet:nth-child(8) { animation-delay: 0.8s; }


/* ===== Additional Polish & Touch Device Support ===== */
@media (hover: none) and (pointer: coarse) {
    /* Touch device optimizations */
    .chicklet:active {
        transform: scale(0.98);
    }
    
    .chicklet {
        min-height: 160px;
    }
}

/* Tablet specific adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .chicklet-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
    
    .main {
        padding: var(--spacing-lg) var(--spacing-md);
    }
}

/* Print styles */
@media print {
    .header {
        background: var(--white);
        color: var(--text-primary);
        box-shadow: none;
    }
    
    .chicklet {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #E5E7EB;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
