/* ===========================
   LIQUID GLASS DESIGN SYSTEM
   Inspired by Apple's Design
   =========================== */

:root {
    /* Colors */
    --primary: #007AFF;
    --secondary: #5856D6;
    --success: #34C759;
    --warning: #FF9500;
    --danger: #FF3B30;
    --info: #5AC8FA;
    
    /* Glass Colors */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: rgba(0, 0, 0, 0.1);
    
    /* Card Colors */
    --card-green: rgba(52, 199, 89, 0.1);
    --card-red: rgba(255, 59, 48, 0.1);
    --card-yellow: rgba(255, 204, 0, 0.1);
    --card-purple: rgba(175, 82, 222, 0.1);
    --card-orange: rgba(255, 149, 0, 0.1);
    --card-pink: rgba(255, 45, 85, 0.1);
    --card-blue: rgba(0, 122, 255, 0.1);
    --card-cyan: rgba(90, 200, 250, 0.1);
    --card-teal: rgba(48, 176, 199, 0.1);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-xl: 36px;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===========================
   RESET & BASE STYLES
   =========================== */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #ffffff;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===========================
   ANIMATED BACKGROUND
   =========================== */

.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.8) 0%, transparent 70%);
    top: -250px;
    left: -250px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(240, 147, 251, 0.8) 0%, transparent 70%);
    top: 50%;
    right: -200px;
    animation-delay: 7s;
}

.orb-3 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(118, 75, 162, 0.8) 0%, transparent 70%);
    bottom: -300px;
    left: 50%;
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(100px, -100px) scale(1.1);
    }
    66% {
        transform: translate(-100px, 100px) scale(0.9);
    }
}

/* ===========================
   GLASS MORPHISM EFFECTS
   =========================== */

.glass-header,
.glass-section,
.glass-footer {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

/* ===========================
   CONTAINER
   =========================== */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===========================
   HEADER
   =========================== */

.glass-header {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin-bottom: var(--spacing-xl);
    position: sticky;
    top: 0;
    z-index: 100;
    animation: slideDown 0.6s ease-out;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
}

.header-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.3), rgba(88, 86, 214, 0.3));
    border-radius: var(--radius-md);
    font-size: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 122, 255, 0.3);
}

.header-text h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.header-text p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

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

/* ===========================
   SECTIONS
   =========================== */

.glass-section {
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    animation: fadeInUp 0.6s ease-out backwards;
}

.glass-section:nth-child(1) { animation-delay: 0.1s; }
.glass-section:nth-child(2) { animation-delay: 0.2s; }
.glass-section:nth-child(3) { animation-delay: 0.3s; }
.glass-section:nth-child(4) { animation-delay: 0.4s; }

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

.section-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.section-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    font-size: 1.8rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===========================
   GRID LAYOUTS
   =========================== */

.grid {
    display: grid;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid-6 {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

/* ===========================
   GLASS CARDS
   =========================== */

.glass-card {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
    color: white;
    transition: all var(--transition-base);
    overflow: hidden;
    cursor: pointer;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.glass-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.glass-card:hover::before {
    opacity: 1;
}

.glass-card:active {
    transform: translateY(-4px) scale(1.01);
}

/* Card Shine Effect */
.card-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.glass-card:hover .card-shine {
    left: 100%;
}

/* Card Icon */
.card-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all var(--transition-base);
}

.glass-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.card-icon img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

/* Card Content */
.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-align: center;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: white;
}

.card-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

/* Card Color Variants */
.card-green { background: var(--card-green); }
.card-red { background: var(--card-red); }
.card-yellow { background: var(--card-yellow); }
.card-purple { background: var(--card-purple); }
.card-orange { background: var(--card-orange); }
.card-pink { background: var(--card-pink); }
.card-blue { background: var(--card-blue); }
.card-cyan { background: var(--card-cyan); }
.card-teal { background: var(--card-teal); }

/* Card Variants */
.card-wide {
    max-width: 300px;
}

.card-featured {
    padding: var(--spacing-xl);
}

.card-featured .card-icon {
    width: 90px;
    height: 90px;
}

.card-featured .card-icon img {
    width: 65px;
    height: 65px;
}

.card-featured .card-title {
    font-size: 1.25rem;
}

/* ===========================
   CENTERED CARDS
   =========================== */

.centered-card {
    display: flex;
    justify-content: center;
    margin-top: var(--spacing-lg);
}

/* ===========================
   INFO BOX
   =========================== */

.info-box {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background: rgba(0, 122, 255, 0.15);
    border: 1px solid rgba(0, 122, 255, 0.3);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
}

.info-box i {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
}

/* ===========================
   FOOTER
   =========================== */

.glass-footer {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.footer-content i {
    font-size: 1.1rem;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 1200px) {
    .header-text h1 {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    :root {
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
    }
    
    .header-content {
        flex-direction: column;
        padding: var(--spacing-md);
    }
    
    .header-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .header-text h1 {
        font-size: 1.75rem;
        text-align: center;
    }
    
    .header-text p {
        font-size: 0.95rem;
        text-align: center;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
    }
    
    .section-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .grid-3,
    .grid-4,
    .grid-6 {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .glass-section {
        padding: var(--spacing-lg);
    }
    
    .glass-card {
        padding: var(--spacing-md);
    }
    
    .card-icon {
        width: 60px;
        height: 60px;
    }
    
    .card-icon img {
        width: 40px;
        height: 40px;
    }
    
    .card-title {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .header-text h1 {
        font-size: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 1.25rem;
    }
    
    .grid-3,
    .grid-4,
    .grid-6 {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-sm);
    }
    
    .glass-card {
        padding: var(--spacing-sm);
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
    }
    
    .card-icon img {
        width: 35px;
        height: 35px;
    }
}

/* ===========================
   ANIMATIONS
   =========================== */

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

/* Hover animations for better UX */
.glass-card:hover {
    animation: pulse 2s infinite;
}

/* ===========================
   ACCESSIBILITY
   =========================== */

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

/* Focus styles for keyboard navigation */
.glass-card:focus {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 4px;
}

/* ===========================
   PRINT STYLES
   =========================== */

@media print {
    .animated-background {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .glass-header,
    .glass-section,
    .glass-footer {
        background: white;
        border: 1px solid #ccc;
    }
}