@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --bg-primary: #0a0a0f;
    --bg-surface: rgba(18, 18, 26, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-purple: #8b5cf6;
    --glow-primary: rgba(59, 130, 246, 0.2);
    --glow-secondary: rgba(139, 92, 246, 0.2);
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
}

/* Background glows */
.bg-glow-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    transition: var(--transition-smooth);
}

.glow-orb-1 {
    top: -10%;
    left: 10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--glow-primary) 0%, transparent 70%);
    animation: drift 20s ease-in-out infinite alternate;
}

.glow-orb-2 {
    bottom: -10%;
    right: 10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--glow-secondary) 0%, transparent 70%);
    animation: drift 25s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(5%, 10%) scale(1.1);
    }
    100% {
        transform: translate(-5%, -5%) scale(0.95);
    }
}

/* Layout Elements */
header {
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(10, 10, 15, 0.5);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.logo-text {
    font-size: 1.25rem;
    letter-spacing: -0.025em;
    background: linear-gradient(to right, #ffffff, #9ca3af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

/* Glassmorphism */
.glass-panel {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Main Container */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Country Picker Layout */
.picker-container {
    width: 100%;
    max-width: 1100px;
    text-align: center;
    padding: 2.5rem;
}

.picker-header {
    margin-bottom: 3.5rem;
}

.picker-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
    background: linear-gradient(to right, #ffffff, #d1d5db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.picker-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.country-card {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.5rem;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.country-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top, var(--card-glow, rgba(59, 130, 246, 0.1)) 0%, transparent 60%);
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: 1;
}

.country-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--card-glow-border, rgba(59, 130, 246, 0.4));
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px var(--card-glow, rgba(59, 130, 246, 0.2));
}

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

.flag-wrapper {
    width: 5rem;
    height: 3.33rem;
    border-radius: 0.375rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
    transition: var(--transition-smooth);
}

.country-card:hover .flag-wrapper {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
}

.flag-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.country-card h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    z-index: 2;
}

.country-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    z-index: 2;
}

/* Country Landing Page Layout */
.country-hero-panel {
    width: 100%;
    max-width: 900px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.country-hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.country-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.large-flag-wrapper {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 3/2;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 1.5rem;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.large-flag-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.country-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.country-info-panel {
    display: flex;
    flex-direction: column;
}

.country-title {
    font-size: 3rem;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #ffffff, #e5e7eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.country-fullname {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.country-desc {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Quick Stats */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    padding: 1rem;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Fact Box */
.fact-box {
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--accent-blue);
    border-radius: 0 0.75rem 0.75rem 0;
    padding: 1.25rem;
    margin-bottom: 2.25rem;
    position: relative;
    overflow: hidden;
}

.fact-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-blue);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fact-content {
    font-size: 0.925rem;
    line-height: 1.5;
    color: var(--text-primary);
    font-style: italic;
    transition: var(--transition-smooth);
}

.fact-nav {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.fact-nav-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-secondary);
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: var(--transition-smooth);
}

.fact-nav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

/* Footer styling */
footer {
    width: 100%;
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    background-color: rgba(10, 10, 15, 0.5);
    backdrop-filter: blur(12px);
    z-index: 10;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .country-hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .country-hero-panel {
        padding: 2rem;
    }
    
    .country-title {
        font-size: 2.25rem;
    }
    
    header {
        padding: 1rem 1.5rem;
    }
    
    main {
        padding: 1rem;
    }
}
