/* ===== CSS Variables ===== */
:root {
    --primary-color: #00bcd4;
    --primary-hover: #00acc1;
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    --text-color: #e0e0e0;
    --text-secondary: #aaaaaa;
    --border-color: #333;
    --shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* ===== Base ===== */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #fff;
    text-decoration: underline;
}

/* ===== Header & Navigation ===== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 5%;
    background-color: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.logo {
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.logo:hover {
    transform: scale(1.02);
    text-decoration: none;
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-links a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.nav-links a.active {
    color: var(--primary-color);
    background: rgba(0, 188, 212, 0.1);
    font-weight: 600;
}

/* ===== Language Dropdown ===== */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-dropbtn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    padding: 8px 14px;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    line-height: 1;
}

.lang-dropbtn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
}

.lang-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: var(--surface-color);
    min-width: 160px;
    box-shadow: var(--shadow);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    z-index: 9999;
    margin-top: 6px;
    overflow-y: auto !important;
    max-height: 350px !important;
    animation: fadeIn 0.15s ease-out;
}

@media (max-width: 768px) {
    .lang-dropdown-content {
        max-height: 250px !important;
        position: absolute;
        right: 0;
        width: auto;
        min-width: 180px;
    }
}

.lang-dropdown-content a {
    color: var(--text-color) !important;
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    transition: background 0.2s;
    border-radius: 0;
}

.lang-dropdown-content a:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: var(--primary-color) !important;
    text-decoration: none;
}

.lang-dropdown-content a.active {
    color: var(--primary-color) !important;
    background-color: rgba(0, 188, 212, 0.05) !important;
    font-weight: 600;
}

.lang-dropdown.open .lang-dropdown-content {
    display: block;
}

.globe-icon,
.arrow-icon {
    flex-shrink: 0;
    opacity: 0.7;
}

.flag-icon {
    display: inline-flex;
    align-items: center;
    width: 20px;
    height: 14px;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 0 1px rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.flag-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

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

/* ===== Footer ===== */
footer {
    background: #1a1a1a;
    padding: 3rem 1rem;
    text-align: center;
    margin-top: auto;
    border-top: 2px solid var(--primary-color);
    color: #ffffff;
    font-size: 0.9rem;
    position: relative;
    z-index: 10;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 5px;
    font-weight: bold;
    transition: all 0.3s;
}

footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-links a {
    margin: 0 10px;
}

.footer-lang {
    margin-bottom: 20px;
}

/* ===== Responsive Header ===== */
@media (max-width: 900px) {
    header {
        position: static;
        flex-direction: column;
        padding: 1rem;
        gap: 0.8rem;
    }

    .nav-links {
        gap: 5px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links a {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
}
