@import url('https://fonts.googleapis.com/css2?family=Tektur&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Pacifico&display=swap');

:root {
    --WF-Base-800: #090F1D;
    --WF-Base-900: #1A202C;
    --WF-Base-700: #111827;
    --WF-Base-500: #A0ABC0;

    --WF-Text-Main: #CBD2E0;
    --WF-Text-Muted: #94A3B8;
    --WF-Accent: #6A1EE0;

    --radius: 16px;
}

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

body {
    margin: 0;
    background: var(--WF-Base-800);
    font-family: 'Inter', sans-serif;
    color: var(--WF-Text-Main);
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 95%;
    margin: 32px auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.navbar {
    height: 72px;
    background: var(--WF-Base-900);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    z-index: 1000;
    border-bottom: 1px solid var(--WF-Base-800);
}

.navbar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    cursor: pointer;
    color: #cfd3ff;
    font-weight: 500;
    position: relative;
    transition: color 0.15s ease;
}

.navbar-links {
    display: flex;
    gap: 24px;
}

.navbar-item span {
    white-space: nowrap;
}

.navbar-item:hover {
    color: white;
}

.navbar-item.active {
    color: white;
}

.navbar-left,
.navbar-right {
    display: flex;
    align-items: center;
    gap: 24px;
}


.navbar-item.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -18px;
    height: 2px;
    background: #6a1ee0;
    border-radius: 2px;
}

.nav-icon {
    width: 18px;
    height: 18px;
    opacity: 0.8;
}

.navbar-item:hover .nav-icon,
.navbar-item.active .nav-icon {
    opacity: 1;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    opacity: 0.6;
    pointer-events: none;
}

.search {
    background: var(--WF-Base-800);
    border: 1px solid var(--WF-Base-700);
    color: white;
    padding-left: 36px;
    padding-top: 8px;
    padding-bottom: 8px;
    border-radius: 10px;
    transition: border 0.15s ease;
}

.search:focus {
    outline: none;
    border-color: #6a1ee0;
}

.input-wrapper {
    position: relative; 
}

#results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--WF-Base-900); 
    border: 1px solid var(--WF-Base-700);
    border-radius: 12px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 2000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    display: none; 
}

#results:not(:empty) {
    display: block;
}

.athlete {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    color: var(--WF-Text-Main);
    font-size: 14px;
    transition: background 0.15s ease;
}

.athlete:hover {
    background: var(--WF-Base-700);
}

.athlete .flag {
    width: 20px;
    height: auto;
    border-radius: 2px;
    flex-shrink: 0;
}

.navbar-item,
.navbar-item:visited,
.navbar-item:hover,
.navbar-item:active {
    text-decoration: none;
    color: inherit;
}


.user-info {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    opacity: 0.9;
}

.user-info:hover {
    opacity: 1;
}

.site-footer {
    width: 100%;
    background: linear-gradient(180deg, #111827 0%, #090F1D 100%);
    padding: 48px 0;
    margin-top: 80px;
    z-index: 1000;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;

    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.brand-title {
    font-size: 18px;
    font-weight: 700;
    color: #E5E7EB;
}

.footer-logo {
    width: 42px;
    height: auto;
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.footer-socials img {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.footer-socials img:hover {
    opacity: 1;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-column h4 {
    font-size: 14px;
    font-weight: 600;
    color: #CBD2E0;
    margin-bottom: 8px;
}

.footer-column a {
    font-size: 13px;
    color: #94A3B8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: #5FA9EE;
}

.navbar-olympics {
    background: var(--WF-Accent); 
    border-radius: var(--radius);
    padding: 6px 10px;
    gap: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
}

.navbar-olympics:hover {
    background: rgba(106, 30, 224, 0.35);
    transform: translateY(-2px);
}

.navbar-olympics img.nav-icon {
    width: 18px;
    height: 18px;
    filter: brightness(1.2); 
}

/* === RESPONSIVE === */
.burger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    cursor: pointer;
}

.burger span {
    display: block;
    height: 2px;
    background: var(--WF-Text-Main);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.navbar-menu {
    display: flex;
    gap: 24px;
}

.burger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.burger.open span:nth-child(2) {
    opacity: 0;
}
.burger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}


@media (max-width: 768px) {
    .container {
        width: 95%;
        margin: 16px auto;
        gap: 16px;
    }

    .navbar-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        background: var(--WF-Base-900);
        flex-direction: column;
        width: 200px;
        padding: 16px;
        border-left: 1px solid var(--WF-Base-800);
        border-bottom: 1px solid var(--WF-Base-800);
    }

    .navbar-links.active {
        display: flex;
    }

    .burger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
        cursor: pointer;
    }

    .burger span {
        display: block;
        height: 2px;
        background: var(--WF-Text-Main);
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .navbar-links .navbar-item {
        justify-content: flex-start; 
    }
}

@media (max-width: 1024px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 600px) {
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 24px;
    }

    .footer-socials {
        justify-content: center;
    }
}