:root {
    --color-blue: #1F77D9;
    --color-orange: #FF8C3A;
    --color-green: #10B981;
    --color-purple: #7C3AED;
    
    --light-bg: linear-gradient(-45deg, #FF8C3A 0%, #1F77D9 25%, #10B981 50%, #7C3AED 75%, #FF8C3A 100%);
    --dark-bg: linear-gradient(-45deg, #FF8C3A 0%, #1F77D9 25%, #10B981 50%, #7C3AED 75%, #FF8C3A 100%);
    
    --light-text-primary: #000000;
    --light-text-secondary: #333333;
    --dark-text-primary: #FFFFFF;
    --dark-text-secondary: #E0E0E0;
    
    --light-glass-bg: rgba(255, 255, 255, 0.25);
    --light-glass-border: rgba(255, 255, 255, 0.35);
    --dark-glass-bg: rgba(0, 0, 0, 0.25);
    --dark-glass-border: rgba(255, 255, 255, 0.2);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============= LIGHT MODE (DEFAULT) ============= */
body {
    --bg-gradient: var(--light-bg);
    --text-primary: var(--light-text-primary);
    --text-secondary: var(--light-text-secondary);
    --glass-bg: var(--light-glass-bg);
    --glass-border: var(--light-glass-border);
}

/* ============= DARK MODE ============= */
body.dark-mode {
    --bg-gradient: var(--dark-bg);
    --text-primary: var(--dark-text-primary);
    --text-secondary: var(--dark-text-secondary);
    --glass-bg: var(--dark-glass-bg);
    --glass-border: var(--dark-glass-border);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--bg-gradient);
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    transition: color 0.3s ease;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ============= THEME TOGGLE ============= */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 200;
}

.theme-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.theme-btn:hover {
    background: var(--color-blue);
    color: white;
    border-color: var(--color-blue);
    transform: rotate(20deg);
    box-shadow: 0 8px 20px rgba(31, 119, 217, 0.3);
}

/* ============= BACKGROUND ANIMATIONS ============= */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.floating-shapes {
    width: 100%;
    height: 100%;
    opacity: 0.5;
}

.shape {
    animation: float 6s ease-in-out infinite;
}

.shape-1 { animation-delay: 0s; }
.shape-2 { animation-delay: 1s; }
.shape-3 { animation-delay: 2s; }
.shape-4 { animation-delay: 3s; }
.shape-5 { animation-delay: 4s; }

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

.stars-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.stars {
    width: 100%;
    height: 100%;
}

.star {
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        r: 1px;
    }
    50% {
        opacity: 1;
        r: 2px;
    }
}

/* ============= CONTAINER ============= */
.country-selection-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
    gap: 30px;
}

/* ============= HEADER ============= */
.selection-header {
    text-align: center;
    margin-bottom: 20px;
}

.animated-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    position: relative;
}

.animated-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.15));
}

.circle-pulse {
    animation: pulse 2s ease-in-out infinite;
    stroke: var(--color-blue);
}

@keyframes pulse {
    0%, 100% {
        r: 45px;
        stroke-width: 2;
        opacity: 1;
    }
    50% {
        r: 50px;
        stroke-width: 1;
        opacity: 0.5;
    }
}

.heart-beat {
    animation: heartbeat 1.5s ease-in-out infinite;
    transform-origin: 50px 50px;
    fill: var(--color-purple);
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(1);
    }
}

.dot-1, .dot-2, .dot-3 {
    animation: dot-float 2s ease-in-out infinite;
}

.dot-1 { 
    animation-delay: 0s;
    fill: var(--color-orange);
}
.dot-2 { 
    animation-delay: 0.4s;
    fill: var(--color-green);
}
.dot-3 { 
    animation-delay: 0.8s;
    fill: var(--color-orange);
}

@keyframes dot-float {
    0%, 100% {
        opacity: 0.5;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-8px);
    }
}

.brand-text {
    font-size: 2.8rem;
    color: #000000;
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: -0.8px;
    text-shadow: 0 2px 8px rgba(255, 255, 255, 0.5);
}

.tagline {
    font-size: 1.2rem;
    color: #ffffff;
    font-style: italic;
    font-weight: 600;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* ============= GLASS CARD ============= */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px) brightness(1.1);
    -webkit-backdrop-filter: blur(10px) brightness(1.1);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 50px 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
                inset 0 0 20px rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 900px;
    position: relative;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 100%);
    border-radius: 30px;
    pointer-events: none;
    z-index: -1;
}

.card-header {
    text-align: center;
    margin-bottom: 40px;
}

.card-header h2 {
    font-size: 2rem;
    color: #000000;
    margin-bottom: 12px;
    text-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
}

.info-text {
    color: #ffffff;
    font-size: 1rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* ============= COUNTRIES GRID ============= */
.countries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.country-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.country-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(31, 119, 217, 0.3) 0%, rgba(255, 140, 58, 0.3) 100%);
    transition: left 0.5s ease;
    z-index: -1;
}

.country-btn:hover {
    border-color: var(--color-blue);
    background: rgba(31, 119, 217, 0.15);
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(31, 119, 217, 0.2),
                inset 0 0 15px rgba(255, 255, 255, 0.1);
}

.country-btn:hover::before {
    left: 0;
}

.btn-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
    animation: icon-bounce 0.6s ease-in-out;
}

.country-btn:hover .btn-icon {
    animation: icon-bounce 0.6s ease-in-out infinite;
}

@keyframes icon-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.btn-text {
    display: block;
    margin-bottom: 5px;
    color: #000000;
    font-weight: 600;
}

.country-btn small {
    font-size: 0.75rem;
    color: #333333;
    font-weight: 400;
}

/* ============= COMING SOON ============= */
.coming-soon-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 25px;
    background: rgba(16, 185, 129, 0.1);
    border: 1.5px solid rgba(16, 185, 129, 0.3);
    border-radius: 15px;
    color: var(--text-primary);
    font-size: 0.95rem;
    backdrop-filter: blur(5px);
}

.globe-icon {
    width: 40px;
    height: 40px;
    animation: rotate-globe 4s linear infinite;
    stroke: var(--color-green);
}

@keyframes rotate-globe {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(360deg);
    }
}

/* ============= FOOTER ============= */
.footer-text {
    text-align: center;
    color: #ffffff;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ============= RESPONSIVE ============= */
@media (max-width: 768px) {
    .country-selection-container {
        padding: 30px 15px;
        gap: 20px;
    }

    .glass-card {
        padding: 35px 25px;
        border-radius: 25px;
    }

    .card-header h2 {
        font-size: 1.6rem;
    }

    .countries-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 15px;
    }

    .country-btn {
        padding: 20px 15px;
        font-size: 0.85rem;
    }

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

    .brand-text {
        font-size: 2rem;
    }

    .theme-toggle {
        top: 15px;
        right: 15px;
    }

    .theme-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .country-selection-container {
        padding: 20px 15px;
    }

    .animated-icon {
        width: 100px;
        height: 100px;
        margin-bottom: 20px;
    }

    .brand-text {
        font-size: 1.6rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .glass-card {
        padding: 25px 20px;
        border-radius: 20px;
    }

    .card-header h2 {
        font-size: 1.4rem;
    }

    .info-text {
        font-size: 0.9rem;
    }

    .countries-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .country-btn {
        padding: 18px 12px;
        font-size: 0.8rem;
    }

    .btn-icon {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }

    .country-btn small {
        font-size: 0.7rem;
    }

    .coming-soon-text {
        padding: 20px;
        gap: 10px;
        font-size: 0.85rem;
    }

    .globe-icon {
        width: 35px;
        height: 35px;
    }

    .theme-toggle {
        top: 12px;
        right: 12px;
    }

    .theme-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}
