/* Auth button in nav */
#auth-btn {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 0.4rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

#auth-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.nav-auth {
    position: relative;
}

.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.5rem;
    min-width: 140px;
    z-index: 200;
}

.user-menu button {
    width: 100%;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    text-align: left;
}

.user-menu button:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

/* Auth modal */
.auth-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
}

.auth-modal.visible {
    display: flex;
}

.auth-modal-content {
    background: #16161e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 380px;
    margin: 1rem;
}

.auth-modal-content h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-form input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.auth-form input:focus {
    border-color: rgba(161, 140, 209, 0.5);
}

.auth-form input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

#auth-submit {
    width: 100%;
    padding: 0.85rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #a18cd1, #fbc2eb);
    color: #0b0b0f;
    transition: opacity 0.2s;
}

#auth-submit:hover {
    opacity: 0.85;
}

#auth-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#auth-toggle {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.85rem;
    cursor: pointer;
    text-align: center;
    padding: 0.5rem;
}

#auth-toggle:hover {
    color: rgba(255, 255, 255, 0.7);
}

.password-field {
    position: relative;
    width: 100%;
}

.password-field input {
    width: 100%;
    padding-right: 3rem;
}

.eye-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem 0.4rem;
    opacity: 0.4;
    transition: opacity 0.2s;
    line-height: 1;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.eye-toggle:hover {
    opacity: 0.8;
}

.auth-link {
    background: none;
    border: none;
    color: rgba(161, 140, 209, 0.7);
    font-size: 0.85rem;
    cursor: pointer;
    text-align: center;
    padding: 0.2rem;
}

.auth-link:hover {
    color: rgba(161, 140, 209, 1);
}

#auth-confirm-wrap {
    margin: 0;
}

#auth-error {
    font-size: 0.85rem;
    color: #f87171;
    text-align: center;
    min-height: 1.2em;
}

/* ── Burger menu ── */
.burger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
}

.burger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 2px;
    transition: all 0.3s;
}

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

.burger-btn.open span:nth-child(2) {
    opacity: 0;
}

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

@media (max-width: 700px) {
    .burger-btn {
        display: flex;
    }

    nav {
        flex-wrap: wrap;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 0 0;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        margin-top: 0.8rem;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        padding: 0.7rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        font-size: 1rem;
    }
}
