/* Header Gradient Animato */
.main-header-gradient {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    animation: gradientMove 15s ease infinite;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.main-header-gradient.scrolled {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    backdrop-filter: blur(20px);
}

@keyframes gradientMove {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.header-background-animated {
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, 
        rgba(255,255,255,0.1) 25%, 
        transparent 25%, 
        transparent 75%, 
        rgba(255,255,255,0.1) 75%);
    background-size: 60px 60px;
    animation: bgMove 20s linear infinite;
    opacity: 0.3;
}

@keyframes bgMove {
    0% { background-position: 0 0; }
    100% { background-position: 60px 60px; }
}

.header-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.2) 0%, transparent 70%);
    pointer-events: none;
}

.header-container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

/* Brand Animato */
.header-brand-animated {
    flex-shrink: 0;
    padding-left: 10px;
}

.brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-wrapper {
    position: relative;
    width: 50px;
    height: 50px;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.header-logo-animated {
    width: 100%;
    height: 100%;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    position: relative;
    z-index: 2;
}

.logo-ring {
    position: absolute;
    inset: -4px;
    border-radius: 16px;
    background: linear-gradient(45deg, #fff, transparent);
    opacity: 0.3;
    animation: rotate 3s linear infinite;
}

.logo-pulse {
    position: absolute;
    inset: -8px;
    border-radius: 18px;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.6; }
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header-title-gradient {
    font-size: 26px;
    font-weight: 900;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.header-tagline {
    font-size: 11px;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Navigation Glass */
.header-navigation-glass {
    display: flex;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(20px);
    padding: 6px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.nav-item-glass {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    text-decoration: none;
    color: rgba(255,255,255,0.9);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.nav-item-glass:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.nav-item-glass.active {
    background: rgba(255,255,255,0.95);
    color: #667eea;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.nav-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.nav-item-glass:hover .nav-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

.nav-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.nav-item-glass:hover .nav-glow {
    opacity: 1;
}

/* Actions Animated */
.header-actions-animated {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Icon Button Animated */
.icon-btn-animated {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
    overflow: hidden;
}

.icon-btn-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.icon-btn-animated:hover .icon-btn-bg {
    opacity: 1;
}

.icon-btn-animated:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.notification-badge-pulse {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(240, 147, 251, 0.5);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.icon-ripple {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: scale(0);
    opacity: 0;
}

.icon-btn-animated:active .icon-ripple {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    to {
        transform: scale(2);
        opacity: 0;
    }
}

/* User Menu Glass */
.user-menu-glass {
    position: relative;
}

.user-trigger-glass {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    border-radius: 50px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.2);
    cursor: pointer;
    transition: all 0.3s;
    overflow: hidden;
}

.user-trigger-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.user-trigger-glass:hover .user-trigger-bg {
    opacity: 1;
}

.user-trigger-glass:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.user-avatar-glass {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.avatar-gradient {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 16px;
}

.user-name-glass {
    font-weight: 700;
    color: white;
    font-size: 15px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.chevron-animated {
    transition: transform 0.3s;
}

.user-trigger-glass:hover .chevron-animated {
    transform: translateY(2px);
}

.user-trigger-glow {
    position: absolute;
    inset: 0;
    border-radius: 50px;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.user-trigger-glass:hover .user-trigger-glow {
    opacity: 1;
}

/* Dropdown Glass */
.user-dropdown-glass {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 300px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(40px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.5);
    display: none;
    overflow: hidden;
}

.user-dropdown-glass.show {
    display: block;
    animation: dropdownSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-bg-blur {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(240, 147, 251, 0.1) 100%);
    z-index: -1;
}

.dropdown-header-glass {
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(240, 147, 251, 0.05) 100%);
}

.dropdown-user-card {
    display: flex;
    gap: 14px;
    align-items: center;
}

.dropdown-avatar-large {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.avatar-gradient-large {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
    font-size: 22px;
}

.dropdown-user-details {
    flex: 1;
}

.dropdown-user-name-large {
    font-weight: 800;
    color: #1a1a1a;
    font-size: 17px;
    margin-bottom: 4px;
}

.dropdown-user-email-glass {
    font-size: 13px;
    color: #6b7280;
}

.dropdown-divider-gradient {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1), transparent);
    margin: 12px 0;
}

.dropdown-menu-items {
    padding: 12px 8px;
}

.dropdown-link-glass {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    text-decoration: none;
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.2s;
    overflow: hidden;
}

.dropdown-link-hover {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(240, 147, 251, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.2s;
}

.dropdown-link-glass:hover .dropdown-link-hover {
    opacity: 1;
}

.dropdown-link-glass.danger {
    color: #ef4444;
}

.danger-hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(245, 85, 108, 0.1) 100%);
}

.dropdown-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(0,0,0,0.05);
    transition: all 0.2s;
}

.dropdown-link-glass:hover .dropdown-link-icon {
    transform: scale(1.1);
    background: rgba(102, 126, 234, 0.15);
}

/* Login Button Gradient */
.btn-login-gradient {
    right:5px;
    position: relative;
    padding: 12px 32px;
    border-radius: 50px;
    background: white;
    color: #667eea;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(255,255,255,0.3);
    transition: all 0.3s;
}

.btn-text {
    position: relative;
    z-index: 2;
}

.btn-gradient-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-login-gradient:hover .btn-gradient-bg {
    opacity: 1;
}

.btn-login-gradient:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(255,255,255,0.4);
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* Mobile Menu Animated */
.mobile-menu-animated {
    display: none;
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: none;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    overflow: hidden;
}

.mobile-menu-bg {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.2);
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-menu-animated:hover .mobile-menu-bg {
    opacity: 1;
}

.mobile-menu-animated span {
    width: 24px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s;
}

.mobile-menu-animated.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-animated.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-animated.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Header Particles */
.header-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    animation: float 8s infinite ease-in-out;
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    left: 30%;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    left: 50%;
    animation-delay: 4s;
}

.particle:nth-child(4) {
    left: 70%;
    animation-delay: 1s;
}

.particle:nth-child(5) {
    left: 90%;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(80px);
        opacity: 0;
    }
    10%, 90% {
        opacity: 1;
    }
    50% {
        transform: translateY(-20px);
    }
}





/* ============================================
   RESPONSIVE HEADER - VERSIONE MIGLIORATA
   ============================================ */

/* Tablet e schermi medi (1024px e inferiori) */
@media (max-width: 1024px) {
    .header-container {
        height: 70px;
        padding: 0 16px;
        gap: 16px;
    }
    
    .header-title-gradient {
        font-size: 22px;
    }
    
    .header-navigation-glass {
        gap: 4px;
    }
    
    .nav-item-glass {
        padding: 10px 14px;
        font-size: 13px;
    }
}

/* Schermi stretti (900px e inferiori) */
@media (max-width: 900px) {
    .header-container {
        gap: 12px;
    }
    
    /* Nascondi il tagline sotto il logo */
    .header-tagline {
        display: none;
    }
    
    /* Logo rimane 50x50px */
    
    /* Nascondi testo navigazione, mostra solo icone */
    .nav-item-glass span {
        display: none;
    }
    
    .nav-item-glass {
        padding: 10px;
        min-width: auto;
    }
    
    /* Nascondi nome utente nel menu */
    .user-name-glass {
        display: none;
    }
    
    /* Riduci avatar utente */
    .user-avatar-glass {
        width: 36px;
        height: 36px;
    }
    
    .user-trigger-glass {
        padding: 6px;
    }
}

/* Mobile (768px e inferiori) */
@media (max-width: 768px) {
    .header-container {
        height: 64px;
        padding: 0 12px;
        gap: 8px;
    }
    
    /* Logo rimane 50x50px anche su mobile */
    
    .header-title-gradient {
        font-size: 18px;
    }
    
    /* Mostra il pulsante hamburger menu */
    .mobile-menu-animated {
        display: flex;
    }
    
    /* Trasforma la navigazione in sidebar laterale */
    .header-navigation-glass {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(40px);
        flex-direction: column;
        padding: 80px 20px 20px;
        gap: 8px;
        border-radius: 0;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 4px 0 32px rgba(0,0,0,0.5);
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        overflow-y: auto;
    }
    
    /* Quando menu è aperto, slide da sinistra */
    .header-navigation-glass.show {
        left: 0;
    }
    
    /* Ripristina testo nei link quando menu aperto */
    .header-navigation-glass.show .nav-item-glass {
        width: 100%;
        padding: 14px 20px;
        justify-content: flex-start;
    }
    
    .header-navigation-glass.show .nav-item-glass span {
        display: block;
    }
    
    /* Overlay scuro quando menu aperto */
    .header-navigation-glass.show::before {
        content: '';
        position: fixed;
        top: 0;
        left: 280px;
        width: calc(100vw - 280px);
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
    
    /* Posiziona dropdown utente su mobile */
    .user-dropdown-glass {
        position: fixed;
        top: 70px;
        right: 12px;
        left: 12px;
        width: auto;
        max-width: 360px;
        margin-left: auto;
    }
    
    /* Riduci dimensioni icone notifiche */
    .icon-btn-animated {
        width: 40px;
        height: 40px;
    }
    
    .icon-btn-animated svg {
        width: 20px;
        height: 20px;
    }
}

/* Schermi molto stretti (360px e inferiori) */
@media (max-width: 360px) {
    .header-container {
        padding: 0 8px;
    }
    
    .header-title-gradient {
        font-size: 16px;
    }
    
    /* Solo su schermi MOLTO piccoli, riduci leggermente il logo */
    .header-logo-animated {
        width: 42px;
        height: 42px;
    }
    
    .header-actions-animated {
        gap: 6px;
    }
    
    .icon-btn-animated {
        width: 36px;
        height: 36px;
    }
    
    .user-avatar-glass {
        width: 32px;
        height: 32px;
    }
    
    .mobile-menu-animated {
        width: 40px;
        height: 40px;
        right:5px;
    }
    
    .mobile-menu-animated span {
        width: 20px;
    }
}

/* Fix z-index per sovrapposizioni corrette */
.main-header-gradient {
    z-index: 1000;
}

.header-navigation-glass {

    z-index: 999;
    overflow-y: hidden;

    /* Glassmorphism */
    background: rgba(102, 126, 234, 0.7); /* colore principale traslucido */
    backdrop-filter: blur(10px);          /* effetto sfocato */
    -webkit-backdrop-filter: blur(10px);  /* supporto Safari */

    /* Gradiente leggero per profondità */
    background: linear-gradient(
        135deg,
        rgba(102, 126, 234, 0.7) 0%,
        rgba(118, 75, 162, 0.7) 100%
    );

    border-bottom: 1px solid rgba(255, 255, 255, 0.2); /* sottile bordo semi-trasparente */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);            /* ombra soft per profondità */
    border-radius: 0 0 16px 16px;                      /* arrotondamento basso */

    transition: background 0.3s ease, box-shadow 0.3s ease; /* transizione fluida */
}


.user-dropdown-glass {
    z-index: 998;
}

/* Hide old header styles */
.main-header-classic {
    display: none !important;
}





/* Hide old header styles */
.main-header-classic {
    display: none !important;
}/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --secondary: #8b5cf6;
    --bg-primary: #f5f7fa;
    --bg-card: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --radius: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
    background: #0f172a;
    color: var(--text-primary);
    line-height: 1.5;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Sfondo Animato Scuro */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    animation: backgroundPulse 10s ease-in-out infinite;
}

@keyframes backgroundPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Sfere Gradient Animate */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(240, 147, 251, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(79, 172, 254, 0.12) 0%, transparent 50%);
    animation: floatOrbs 20s ease-in-out infinite;
}

@keyframes floatOrbs {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    33% {
        transform: translate(50px, -30px) scale(1.1);
        opacity: 0.8;
    }
    66% {
        transform: translate(-30px, 40px) scale(0.9);
        opacity: 0.9;
    }
}

/* Stelle Animate */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite;
}

.star:nth-child(1) { top: 10%; left: 20%; animation-delay: 0s; }
.star:nth-child(2) { top: 20%; left: 80%; animation-delay: 0.5s; }
.star:nth-child(3) { top: 30%; left: 50%; animation-delay: 1s; }
.star:nth-child(4) { top: 40%; left: 10%; animation-delay: 1.5s; }
.star:nth-child(5) { top: 50%; left: 90%; animation-delay: 2s; }
.star:nth-child(6) { top: 60%; left: 30%; animation-delay: 2.5s; }
.star:nth-child(7) { top: 70%; left: 70%; animation-delay: 0.8s; }
.star:nth-child(8) { top: 80%; left: 40%; animation-delay: 1.2s; }
.star:nth-child(9) { top: 15%; left: 60%; animation-delay: 1.8s; }
.star:nth-child(10) { top: 85%; left: 15%; animation-delay: 2.3s; }

@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

/* Pattern Griglia Animata */
.grid-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: 
        linear-gradient(rgba(102, 126, 234, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(102, 126, 234, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    pointer-events: none;
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

/* Header Classico */
.main-header-classic {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

/* Brand */
.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.header-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.header-title {
    font-size: 24px;
    font-weight: 800;
    color: #1a1a1a;
}

/* Navigation */
.header-navigation {
    display: flex;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    color: #6b7280;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
}

.nav-item:hover {
    background: #f3f4f6;
    color: #1a1a1a;
}

.nav-item.active {
    background: linear-gradient(135deg, #ffffff 0%, #d0d0d0 100%);
    color: white;
}

.nav-item svg {
    flex-shrink: 0;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    color: #6b7280;
}

.header-icon-btn:hover {
    background: #e5e7eb;
    color: #1a1a1a;
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* User Menu */
.user-menu-dropdown {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border-radius: 50px;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.user-menu-trigger:hover {
    background: #e5e7eb;
}

.user-avatar-header {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.user-name-header {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 15px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dropdown Menu */
.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 280px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    border: 1px solid #e5e7eb;
    display: none;
    overflow: hidden;
}

.user-dropdown-menu.show {
    display: block;
    animation: dropdownSlide 0.2s ease;
}

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

.dropdown-header {
    padding: 16px;
    background: #f9fafb;
}

.dropdown-user-info {
    display: flex;
    gap: 12px;
    align-items: center;
}

.dropdown-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.dropdown-avatar-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
}

.dropdown-user-name {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 15px;
}

.dropdown-user-email {
    font-size: 13px;
    color: #6b7280;
}

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 0;
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
}

.dropdown-link:hover {
    background: #f3f4f6;
}

.dropdown-link.danger {
    color: #ef4444;
}

.dropdown-link.danger:hover {
    background: #fee2e2;
}

.btn-login-header {
    padding: 10px 24px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
}

.btn-login-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 3px;
    background: #1a1a1a;
    border-radius: 3px;
    transition: all 0.3s;
}

/* Main Content */
.main-content {
    max-width: 680px;
    margin: 24px auto;
    padding: 0 16px 80px;
}

/* Header Minimale */
.main-header {
    display: none;
}

/* Remove all hero/old styles */
.hero-logo-section,
.hero-logo-container,
.hero-logo,
.hero-app-name,
.hero-nav,
.hero-nav-link,
.hero-logout-link,
.app-main-clean,
.top-header,
.top-header-container,
.header-left,
.header-logo-link {
    display: none !important;
}

/* Search Container */
.search-container {
    padding: 16px;
    margin: 20px 0;
    border-radius: 16px; /* già presente */
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.search-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.notif-btn {
    position: relative;
}

.notif-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

.search-form {
    flex: 1;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    z-index: 1;
}

.search-input {
    width: 100%;
    height: 44px;
    border-radius: 22px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    padding: 0 16px 0 48px;
    font-size: 15px;
    color: var(--text-primary);
    transition: all 0.2s;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-input:focus {
    outline: none;
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Feed Container - versione base */
.feed-container {
    padding: 0;
}

/* Mobile e Tablet - gap tra le card */
@media (max-width: 1024px) {
    .feed-container {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
}

/* Secret Card App Style */
.secret-card-app {
    background: var(--bg-card);
    margin: 0;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
    position: relative;
}

/* Card glow effect on hover */
.secret-card-app::before {
    display: none;
}

/* Card Header */
.card-header-app {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.card-header-app::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}

.secret-card-app:hover .card-header-app::before {
    left: 100%;
}

.card-header-app .username-app,
.card-header-app .post-info-app {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.card-header-app .age-badge {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
}

.card-header-app .location-badge-app {
    color: rgba(255, 255, 255, 0.85);
}

.card-header-app .dot {
    color: rgba(255, 255, 255, 0.6);
}

.card-header-app svg {
    stroke: rgba(255, 255, 255, 0.9);
}

.card-header-app .menu-dots-btn {
    color: rgba(255, 255, 255, 0.9);
}

.card-header-app .menu-dots-btn:active {
    background: rgba(255, 255, 255, 0.2);
}

.user-info-app {
    display: flex;
    gap: 12px;
    flex: 1;
}

.avatar-app {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

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

.avatar-placeholder-app {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.user-details-app {
    flex: 1;
    min-width: 0;
}

.username-app {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.age-badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
}

.location-badge-app {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.post-info-app {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.post-info-app svg {
    width: 14px;
    height: 14px;
}

.dot {
    color: #d1d5db;
    font-weight: 700;
}

.menu-dots-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.menu-dots-btn:active {
    background: rgba(0,0,0,0.05);
}

/* Card Content */
.card-content-app {
    padding: 16px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
}

.card-content-app p {
    margin: 0;
}

/* Card Meta */
.card-meta-app {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid #f0f0f0;
    font-size: 13px;
    color: #666;
}

.meta-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.time-ago {
    font-weight: 600;
    color: #667eea !important;
    font-size: 14px;
}

.time-date {
    font-size: 12px;
    color: #999;
}

.meta-right {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: #666;
}

.meta-right svg {
    color: #999;
    flex-shrink: 0;
}
/* Reactions Container */
.reactions-container-app {
    display: flex;
    gap: 8px;
    padding: 12px 16px 16px;
    border-top: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
}

.reactions-container-app::-webkit-scrollbar {
    display: none;
}

.reaction-btn-app {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    background: var(--bg-primary);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.reaction-btn-app:active {
    transform: scale(0.95);
}

.reaction-btn-app.active {
    background: rgba(102, 126, 234, 0.1);
    border-color: var(--primary);
}

.reaction-emoji-app {
    font-size: 20px;
    line-height: 1;
}

.reaction-count-app {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 12px;
}

.reaction-btn-app.active .reaction-count-app {
    color: var(--primary);
}

.comment-btn-app {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    background: var(--bg-primary);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    color: var(--text-secondary);
}

.comment-btn-app:active {
    transform: scale(0.95);
}

.comment-btn-app svg {
    width: 20px;
    height: 20px;
}

/* FAB Button */
.fab-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    z-index: 999;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.fab-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.fab-btn:active::before {
    width: 300px;
    height: 300px;
}

.fab-btn:active {
    transform: scale(0.9);
}

.fab-btn:hover {
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.5);
    transform: translateY(-4px) rotate(90deg);
}

.fab-btn svg {
    position: relative;
    z-index: 1;
    transition: transform 0.3s;
}

.fab-btn:hover svg {
    transform: rotate(-90deg);
}

/* Footer */
.main-footer {
    background: var(--bg-card);
    padding: 32px 16px;
    margin-top: 24px;
    border-top: 1px solid var(--border);
}

.footer-content {
    max-width: 640px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 24px;
}

.footer-section h3, .footer-section h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.footer-section p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    padding: 6px 0;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.social-links a {
    font-size: 20px;
}

.footer-bottom {
    max-width: 640px;
    margin: 0 auto;
    padding-top: 24px;
    margin-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-bottom p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 4px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        padding: 0px;
    }

    .header-navigation {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 16px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        gap: 8px;
    }

    .header-navigation.show {
        display: flex;
    }

    .nav-item {
        width: 100%;
        justify-content: flex-start;
    }

    .user-name-header {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .main-content {
        padding: 0 12px 60px;
    }

    .secret-card-app {
        border-radius: 12px;
    }
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.secret-card-app {
    animation: slideUp 0.3s ease;
}

/* User Menu & Mobile Navigation */
.user-menu {
    position: relative;
}

.user-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-primary);
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
}

.user-avatar, .user-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.user-avatar-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 200px;
    display: none;
    overflow: hidden;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.user-dropdown a:hover {
    background: var(--bg-primary);
}

.user-dropdown hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 24px;
}

.login-container {
    max-width: 440px;
    width: 100%;
}

.login-box {
    background: var(--bg-card);
    padding: 40px 32px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-box h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 8px;
}

.tagline {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 15px;
}

.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.login-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 24px;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-login:active {
    transform: scale(0.98);
}

.btn-login:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.btn-google:hover {
    border-color: #4285F4;
}

.btn-apple {
    background: #000;
    color: white;
    border-color: #000;
}

.btn-apple:hover {
    background: #333;
    border-color: #333;
}

.login-footer {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.privacy-note {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.6;
}

.privacy-note a {
    color: var(--primary);
    text-decoration: none;
}

.privacy-note a:hover {
    text-decoration: underline;
}

.login-features {
    display: none;
}

/* Legal Pages */
.legal-page {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 32px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.legal-page h1 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.last-update {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.legal-page section {
    margin: 24px 0;
}

.legal-page h2 {
    color: var(--primary);
    font-size: 1.5rem;
    margin: 24px 0 12px 0;
}

.legal-page h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin: 16px 0 8px 0;
}

.legal-page p {
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.legal-page ul {
    margin-left: 24px;
    margin-bottom: 12px;
}

.legal-page li {
    line-height: 1.7;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.legal-page a {
    color: var(--primary);
    text-decoration: none;
}

.legal-page a:hover {
    text-decoration: underline;
}

.contact-info {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: 12px;
    margin-top: 12px;
}

.contact-info p {
    margin-bottom: 8px;
}

/* Utilities */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:hover {
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border);
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.pulse {
    animation: pulse 0.5s ease;
}

/* Skeleton Loading */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-primary) 25%, #e0e0e0 50%, var(--bg-primary) 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1024px) {
    .app-main {
        max-width: 740px;
    }
    
    .secret-card-app {
        margin: 12px 16px;
        border-radius: var(--radius);
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .app-main {
        max-width: 640px;
    }
    
    .search-container {
        border-radius: 16px;
    }
    
    .secret-card-app {
        margin: 12px 0;
    }
    
    .fab-btn {
        right: calc(50% - 340px);
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #18181b;
        --bg-card: #27272a;
        --text-primary: #fafafa;
        --text-secondary: #a1a1aa;
        --border: #3f3f46;
    }
    
    .search-input {
        background: rgba(255,255,255,0.15);
        color: white;
    }
    
    .search-input::placeholder {
        color: rgba(255,255,255,0.6);
    }
    
    .menu-btn, .filter-btn, .notif-btn {
        background: rgba(255,255,255,0.15);
    }
}

/* Print Styles */
@media print {
    .search-container,
    .fab-btn,
    .main-footer,
    .reactions-container-app,
    .menu-dots-btn {
        display: none !important;
    }
    
    .secret-card-app {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--border);
    }
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles */
button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background: rgba(102, 126, 234, 0.3);
    color: var(--text-primary);
}

