/**
 * RIFLESSI & INCANTO - Astral Skeuomorphic Glassmorphism
 * Stile Cosmico da Controcazzi 🌌✨
 */

/* ============================================
   ASTRAL GLASS CARDS - EFFETTO 3D PROFONDO
   ============================================ */
.card {
    background: linear-gradient(
        135deg,
        rgba(25, 25, 112, 0.25) 0%,
        rgba(75, 0, 130, 0.15) 50%,
        rgba(138, 43, 226, 0.2) 100%
    );
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: var(--space-2xl);
    margin-bottom: var(--space-xl);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3),
        0 0 60px rgba(138, 43, 226, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at 50% 0%,
        rgba(255, 215, 0, 0.05) 0%,
        transparent 50%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.4),
        0 0 80px rgba(255, 215, 0, 0.3),
        0 0 120px rgba(138, 43, 226, 0.3);
}

.card:hover::after {
    opacity: 1;
}

/* ============================================
   COSMIC GLOW EFFECT
   ============================================ */
.cosmic-glow {
    position: relative;
}

.cosmic-glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(
        45deg,
        var(--luminous-gold),
        var(--astral-cyan),
        var(--cosmic-purple),
        var(--luminous-gold)
    );
    background-size: 400% 400%;
    border-radius: inherit;
    opacity: 0;
    z-index: -1;
    filter: blur(20px);
    animation: cosmic-pulse 8s ease-in-out infinite;
    transition: opacity 0.4s ease;
}

.cosmic-glow:hover::before {
    opacity: 0.6;
}

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

/* ============================================
   ASTRAL BUTTONS - SKEUOMORPHIC 3D
   ============================================ */
.btn {
    position: relative;
    padding: 1rem 2.5rem;
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.15em;
    border-radius: 50px;
    cursor: pointer;
    border: none;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(
        135deg,
        var(--luminous-gold) 0%,
        var(--amber-glow) 50%,
        var(--luminous-gold) 100%
    );
    background-size: 200% 200%;
    color: var(--cosmic-black);
    box-shadow: 
        0 4px 15px rgba(255, 215, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -2px 0 rgba(0, 0, 0, 0.3),
        0 0 30px rgba(255, 215, 0, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    background-position: 100% 50%;
    color: var(--cosmic-black);
    box-shadow: 
        0 8px 25px rgba(255, 215, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -2px 0 rgba(0, 0, 0, 0.4),
        0 0 50px rgba(255, 215, 0, 0.5);
}

.btn-primary:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 
        0 4px 15px rgba(255, 215, 0, 0.6),
        inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 100%
    );
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--pure-white);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    border-color: var(--luminous-gold);
    background: linear-gradient(
        135deg,
        rgba(255, 215, 0, 0.2) 0%,
        rgba(255, 165, 0, 0.1) 100%
    );
    box-shadow: 
        0 8px 25px rgba(255, 215, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3),
        0 0 40px rgba(255, 215, 0, 0.3);
}

/* ============================================
   ASTRAL FORMS - DEEP INSET EFFECT
   ============================================ */
.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.2) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--pure-white);
    font-family: var(--font-body);
    font-size: 1rem;
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(0, 0, 0, 0.3),
        0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.5) 0%,
        rgba(0, 0, 0, 0.3) 100%
    );
    border-color: var(--luminous-gold);
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(0, 0, 0, 0.4),
        0 0 0 3px rgba(255, 215, 0, 0.2),
        0 0 20px rgba(255, 215, 0, 0.3);
}

/* ============================================
   COSMIC SIDEBAR - ASTRAL GLASS
   ============================================ */
.sidebar {
    background: linear-gradient(
        180deg,
        rgba(25, 25, 112, 0.4) 0%,
        rgba(75, 0, 130, 0.3) 50%,
        rgba(25, 25, 112, 0.4) 100%
    );
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        2px 0 40px rgba(0, 0, 0, 0.5),
        inset -1px 0 0 rgba(255, 255, 255, 0.1),
        inset 1px 0 0 rgba(0, 0, 0, 0.2);
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(255, 215, 0, 0.3) 50%,
        transparent 100%
    );
}

/* ============================================
   ASTRAL NAVIGATION LINKS
   ============================================ */
.nav-link {
    position: relative;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.02) 100%
    );
    border: 1px solid transparent;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 1px 2px rgba(0, 0, 0, 0.1);
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 60%;
    background: linear-gradient(
        180deg,
        var(--luminous-gold) 0%,
        var(--amber-glow) 100%
    );
    border-radius: 0 4px 4px 0;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 4px;
}

.nav-link:hover {
    background: linear-gradient(
        135deg,
        rgba(255, 215, 0, 0.15) 0%,
        rgba(255, 165, 0, 0.1) 100%
    );
    border-color: rgba(255, 215, 0, 0.2);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 2px 8px rgba(255, 215, 0, 0.2);
}

.nav-link.active {
    background: linear-gradient(
        135deg,
        rgba(255, 215, 0, 0.25) 0%,
        rgba(255, 165, 0, 0.15) 100%
    );
    border-color: rgba(255, 215, 0, 0.3);
    color: var(--luminous-gold);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 4px 12px rgba(255, 215, 0, 0.3),
        0 0 20px rgba(255, 215, 0, 0.2);
}

/* ============================================
   COSMIC TABLE - ASTRAL DEPTH
   ============================================ */
.data-table {
    background: linear-gradient(
        135deg,
        rgba(25, 25, 112, 0.2) 0%,
        rgba(75, 0, 130, 0.15) 100%
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.data-table th {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 100%
    );
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.data-table tr:hover {
    background: linear-gradient(
        90deg,
        rgba(255, 215, 0, 0.08) 0%,
        rgba(255, 215, 0, 0.05) 50%,
        rgba(255, 215, 0, 0.08) 100%
    );
}

/* ============================================
   ASTRAL BADGES - 3D EMBOSSED
   ============================================ */
.badge {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.08) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.badge-primary {
    background: linear-gradient(
        135deg,
        rgba(255, 215, 0, 0.3) 0%,
        rgba(255, 165, 0, 0.2) 100%
    );
    border-color: var(--luminous-gold);
    box-shadow: 
        0 2px 8px rgba(255, 215, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3),
        0 0 15px rgba(255, 215, 0, 0.3);
}

/* ============================================
   COSMIC HERO SECTION
   ============================================ */
.hero-title {
    background: linear-gradient(
        135deg,
        #C0C0C0 0%,
        #FFFFFF 25%,
        #E8E8E8 50%,
        #FFFFFF 75%,
        #C0C0C0 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.5));
    animation: shimmer 3s linear infinite;
}

.hero-title .ampersand {
    -webkit-text-fill-color: var(--luminous-gold);
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8))
            drop-shadow(0 0 40px rgba(255, 215, 0, 0.5));
}

/* ============================================
   ASTRAL SCROLLBAR - COSMIC STYLE
   ============================================ */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.2) 100%
    );
    border-radius: 10px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        var(--luminous-gold) 0%,
        var(--amber-glow) 100%
    );
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    box-shadow: 
        0 0 10px rgba(255, 215, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        180deg,
        var(--luminous-gold) 0%,
        var(--luminous-gold) 100%
    );
    box-shadow: 
        0 0 20px rgba(255, 215, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.4);
}

/* ============================================
   COSMIC PARTICLES EFFECT
   ============================================ */
@keyframes float-particle {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(20px);
        opacity: 0;
    }
}

.cosmic-particle {
    position: fixed;
    width: 2px;
    height: 2px;
    background: var(--luminous-gold);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--luminous-gold);
    animation: float-particle 15s linear infinite;
    pointer-events: none;
    z-index: 1;
}

/* ============================================
   MENU TOGGLE - ASTRAL BUTTON
   ============================================ */
.menu-toggle {
    background: linear-gradient(
        135deg,
        var(--luminous-gold) 0%,
        var(--amber-glow) 100%
    );
    box-shadow: 
        0 4px 20px rgba(255, 215, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -2px 0 rgba(0, 0, 0, 0.3),
        0 0 30px rgba(255, 215, 0, 0.4);
}

.menu-toggle:hover {
    box-shadow: 
        0 6px 30px rgba(255, 215, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -2px 0 rgba(0, 0, 0, 0.4),
        0 0 50px rgba(255, 215, 0, 0.6);
}

