/* ===============================
   BASE SHINTAKU
   =============================== */
html, body {
    min-height: 100%;
}

html {
    background-color: #070a0e;
}

body {
    margin: 0;
    font-family: sans-serif;
    color: white;
    min-height: 100vh;
    background-color: #070a0e;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(0, 122, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 85%, rgba(0, 200, 255, 0.08) 0%, transparent 45%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
}

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    background-color: transparent;
}

/* --- Navbar --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px;
}

.navbar > div {
    flex: 1;
}

.navbar .return {
    display: flex;
    justify-content: flex-start;
}

.navbar .logo {
    display: flex;
    justify-content: center;
}

.buttons-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.desktop-auth-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* --- Pulsante torna alle storie --- */
.btn-return {
    display: inline-block;
    text-decoration: none;
    border-radius: 50px;
    padding: 8px 24px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.35), rgba(0, 68, 180, 0.15));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(100, 200, 255, 0.3);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.2),
        0 8px 24px rgba(0, 0, 0, 0.2);
}

.btn-return:hover {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.5), rgba(0, 68, 180, 0.25));
    transform: translateY(-1px);
    color: #ffffff;
}

/* --- Profilo utente --- */
.user-profile-widget {
    display: flex;
    align-items: center;
}

.user-profile-widget .profile-ank {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 14px;
}

.user-profile-widget .profile-ank:hover {
    color: #ffffff;
}

.user-avatar-letter {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007aff, #0044b4);
    color: white;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(100, 200, 255, 0.3);
    flex-shrink: 0;
}

/* --- Switch AI (usato in index/chat) --- */
.ai-toggle-pill,
.ai-toggle-sticky {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.toggle-label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.5px;
    user-select: none;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: .3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background-color: #007aff;
    border-color: rgba(100, 200, 255, 0.4);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

/* --- Bottoni auth --- */
.btn-login,
.btn-register,
.btn-logout {
    display: inline-block;
    text-decoration: none;
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.btn-login {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.btn-register {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.35), rgba(0, 68, 180, 0.15));
    border: 1px solid rgba(100, 200, 255, 0.3);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.2),
        0 8px 24px rgba(0, 0, 0, 0.2);
}

.btn-register:hover {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.5), rgba(0, 68, 180, 0.25));
    transform: translateY(-1px);
}

.btn-logout {
    color: #ff3b30;
    background: rgba(255, 59, 48, 0.08);
    border: 1px solid rgba(255, 59, 48, 0.2);
}

.btn-logout:hover {
    background: rgba(255, 59, 48, 0.15);
    border-color: rgba(255, 59, 48, 0.4);
    transform: translateY(-1px);
}

.btn-delete {
    background: none;
    border: none;
    color: #ff3b30;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s;
    font-family: sans-serif;
}

.btn-delete:hover {
    opacity: 0.7;
    text-decoration: underline;
}

/* ===============================
   RESPONSIVE
   =============================== */
@media (max-width: 768px) {
    .desktop-auth-buttons {
        display: none;
    }
}

@media (max-width: 600px) {
    .navbar {
        padding: 4px 10px;
    }

    .btn-return {
        padding: 6px 14px;
        font-size: 11.5px;
    }

    .logo-pill {
        padding: 2px;
    }

    .brand-letter {
        font-size: 16px;
    }

    .kore-o-logo {
        transform: scale(0.75);
        margin: 0 -4px;
    }

    .toggle-label {
        font-size: 11px;
    }

    .switch {
        width: 36px;
        height: 20px;
    }

    .slider:before {
        height: 12px;
        width: 12px;
        left: 3px;
        bottom: 3px;
    }

    input:checked + .slider:before {
        transform: translateX(16px);
    }
}

/* ==========================================
   FOOTER GLOBALE (Kore26)
   ========================================== */

.site-footer {
    width: 100%;
    background-color: rgba(11, 15, 25, 0.95);
    border-top: 1px solid rgba(31, 41, 55, 0.8);
    backdrop-filter: blur(12px);
    margin-top: auto;
    padding: 1.5rem 0 ;
    color: #9ca3af;
    font-size: 0.875rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.footer-copy {
    color: #e5e7eb;
}

.footer-copy strong {
    color: #22d3ee;
}

.footer-subtext {
    color: #9ca3af;
}

.footer-socials {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: transparent;
    border: none;
}

@media (min-width: 768px) {
    .footer-socials {
        align-items: flex-end;
    }
}

.footer-social-title {
    color: #e5e7eb;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.footer-social-list {
    list-style: none;
    display: flex;
    gap: 1.25rem;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
}

.footer-social-link {
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: transparent;
    border:none;
}

/* Gestione delle icone (Bootstrap Icons) */
.footer-social-link i {
    font-size: 1.5rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-social-link:hover i {
    background: linear-gradient(45deg, #405de6, #833ab4, #c13584, #fd1d1d, #f56040);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transform: translateY(-2px);
}

.footer-privacy a {
    color: white;
    text-decoration: none;
}

/* --- Ottimizzazione Footer per Smartphone --- */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-socials {
        align-items: center; /* Centra l'etichetta "Seguimi:" e l'icona su mobile */
    }
}