/* ========================================================
   VUMED HOUSE MEMBERS - DESIGN SYSTEM & 3D CAROUSEL STYLES
   ======================================================== */

body {
    font-family: 'Inter', 'Sarabun', sans-serif;
    margin: 0;
    padding: 0;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    background-color: #1a4d8c;
}

.font-anton {
    font-family: 'Anton', sans-serif;
}

.font-cinzel {
    font-family: 'Cinzel', serif;
}

.font-sarabun {
    font-family: 'Sarabun', sans-serif;
}

.grain-overlay {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

/* 3D Stage Depth Container */
#carousel-container {
    perspective: 1400px;
    perspective-origin: 50% 55%;
}

/* 60fps Smooth CSS Springs for Carousel Items */
.carousel-item {
    transition: transform 750ms cubic-bezier(0.25, 1, 0.35, 1),
                filter 750ms cubic-bezier(0.25, 1, 0.35, 1),
                opacity 750ms cubic-bezier(0.25, 1, 0.35, 1),
                left 750ms cubic-bezier(0.25, 1, 0.35, 1),
                height 750ms cubic-bezier(0.25, 1, 0.35, 1),
                bottom 750ms cubic-bezier(0.25, 1, 0.35, 1);
    will-change: transform, filter, opacity, left, height, bottom;
    transform-style: preserve-3d;
}

/* Ambient Breathing Float on Center Figure */
@keyframes subtleFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

.center-floating {
    animation: subtleFloat 4.5s ease-in-out infinite;
}

/* Standee Clean Drop-shadow (ToonHub Exact Mode - Zero Box Shadow) */
.standee-shadow {
    filter: drop-shadow(0 20px 35px rgba(0, 0, 0, 0.28));
}

/* Glassmorphism Capsule */
.glass-panel {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

/* Giant Ghost Text Glow */
.ghost-text {
    text-shadow: 0 0 80px rgba(255, 255, 255, 0.18);
    pointer-events: none;
    transition: transform 750ms cubic-bezier(0.25, 1, 0.35, 1), opacity 500ms ease;
}

/* Active House Pill Indicator */
.house-btn.active {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #0f172a !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 1);
}

/* Text transitions */
.hud-transition {
    transition: opacity 250ms ease, transform 350ms cubic-bezier(0.25, 1, 0.35, 1);
}
.hud-transition.fade-out {
    opacity: 0;
    transform: translateY(6px);
}

/* High-Agency Student ID Pass Card Design Tokens */
.student-id-pass {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.92) 100%);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.7) inset;
}

.student-id-pass::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.5rem;
    background: linear-gradient(125deg, rgba(255, 255, 255, 0.5) 0%, transparent 40%, rgba(255, 255, 255, 0.2) 60%, transparent 100%);
    pointer-events: none;
}

.smart-chip {
    background: linear-gradient(135deg, #e2c068 0%, #b8973b 50%, #dfbf65 100%);
    border: 1px solid #9e7f2b;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

.lanyard-slot {
    width: 44px;
    height: 10px;
    background: rgba(15, 23, 42, 0.35);
    border-radius: 9999px;
    box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.6), 0 1px 1px rgba(255, 255, 255, 0.8);
}

.hologram-seal {
    background: linear-gradient(135deg, rgba(255, 120, 120, 0.3), rgba(120, 255, 150, 0.3), rgba(120, 180, 255, 0.3), rgba(255, 220, 120, 0.3));
    background-size: 200% 200%;
    animation: holoShift 6s ease infinite;
}

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

/* 3D House Emblem Coin on Pass */
.house-emblem-coin {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, #f1f5f9 60%, #cbd5e1 100%);
    box-shadow: 0 8px 18px -4px rgba(0, 0, 0, 0.35), inset 0 2px 4px rgba(255, 255, 255, 0.9), inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.95);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.house-emblem-coin:hover {
    transform: scale(1.08) rotate(5deg);
}

/* Watermark Sigil Behind Card */
.card-sigil-watermark {
    position: absolute;
    right: -25px;
    bottom: 45px;
    width: 180px;
    height: 180px;
    opacity: 0.07;
    pointer-events: none;
    filter: grayscale(100%) contrast(150%);
    z-index: 1;
    transition: opacity 300ms ease;
}

/* ========================================================
   CARD STAGE & 3D FLIP ARCHITECTURE
   ======================================================== */
#modal-card-dialog {
    transition: max-width 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center center;
    width: 100%;
    max-width: 360px;
}

#specs-modal.is-zoomed #modal-card-dialog {
    max-width: 450px !important;
    transform: scale(1.15);
}

@media (max-width: 640px) {
    #specs-modal.is-zoomed #modal-card-dialog {
        max-width: 95vw !important;
        transform: scale(1.02);
    }
}

.pass-stage {
    perspective: 1200px;
    width: 100%;
}

.pass-card-flipper {
    position: relative;
    width: 100%;
    transform-style: preserve-3d;
    transition: transform 0.75s cubic-bezier(0.25, 1, 0.35, 1);
}

.pass-card-flipper.flipped {
    transform: rotateY(180deg);
}

.card-face {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 26px;
    overflow: hidden;
    width: 100%;
}

.card-face-front {
    position: relative;
    transform: rotateY(0deg);
    transform-style: preserve-3d;
}

.card-face-back {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    transform: rotateY(180deg);
    transform-style: preserve-3d;
}

/* ========================================================
   CARD EDITIONS (3 Flavors: Porcelain, Heritage, Obsidian)
   ======================================================== */

/* 1. Official Porcelain (Clean Medical White) */
.student-id-pass.edition-porcelain {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    color: #0f172a;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

/* 2. House Heritage (Dynamic House Gradient + Gold Trims) */
.student-id-pass.edition-heritage {
    background: var(--card-house-bg, linear-gradient(135deg, #102a4e 0%, #1a4d8c 50%, #0d1e38 100%)) !important;
    color: #ffffff !important;
    border: 1.5px solid rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.25) inset;
}
.student-id-pass.edition-heritage .text-slate-900,
.student-id-pass.edition-heritage .text-slate-800,
.student-id-pass.edition-heritage .text-slate-700 {
    color: #ffffff !important;
}
.student-id-pass.edition-heritage .text-slate-500,
.student-id-pass.edition-heritage .text-slate-400 {
    color: rgba(255, 255, 255, 0.8) !important;
}
.student-id-pass.edition-heritage .metadata-box {
    background: rgba(0, 0, 0, 0.32) !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
    backdrop-filter: blur(10px);
}
.student-id-pass.edition-heritage .card-header-container {
    border-color: rgba(255, 255, 255, 0.2) !important;
}
.student-id-pass.edition-heritage .border-slate-100 {
    border-color: rgba(255, 255, 255, 0.18) !important;
}
.student-id-pass.edition-heritage .barcode-line {
    background-color: #ffffff !important;
}
.student-id-pass.edition-heritage .card-sigil-watermark {
    opacity: 0.16;
    filter: brightness(220%);
}
.student-id-pass.edition-heritage .signature-strip {
    background: rgba(255, 255, 255, 0.92) !important;
    color: #0f172a !important;
}

/* 3. Cyber Obsidian (Midnight Titanium + Warm Amber/Gold) */
.student-id-pass.edition-obsidian {
    background: linear-gradient(145deg, #182030 0%, #0d1424 50%, #030712 100%) !important;
    color: #ffffff !important;
    border: 1.5px solid rgba(245, 158, 11, 0.45) !important;
    box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.95), 0 0 25px rgba(245, 158, 11, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}
.student-id-pass.edition-obsidian .text-slate-900,
.student-id-pass.edition-obsidian .text-slate-800,
.student-id-pass.edition-obsidian .text-slate-700 {
    color: #ffffff !important;
}
.student-id-pass.edition-obsidian .text-slate-500,
.student-id-pass.edition-obsidian .text-slate-400 {
    color: rgba(226, 232, 240, 0.75) !important;
}
.student-id-pass.edition-obsidian .metadata-box {
    background: rgba(0, 0, 0, 0.5) !important;
    border-color: rgba(245, 158, 11, 0.25) !important;
    backdrop-filter: blur(10px);
}
.student-id-pass.edition-obsidian .card-header-container {
    border-color: rgba(245, 158, 11, 0.22) !important;
}
.student-id-pass.edition-obsidian .border-slate-100 {
    border-color: rgba(245, 158, 11, 0.2) !important;
}
.student-id-pass.edition-obsidian .barcode-line {
    background-color: #fbbf24 !important;
}
.student-id-pass.edition-obsidian .photo-frame {
    border-color: rgba(245, 158, 11, 0.5) !important;
}
.student-id-pass.edition-obsidian .card-sigil-watermark {
    opacity: 0.15;
    filter: brightness(240%) sepia(80%) hue-rotate(5deg);
}
.student-id-pass.edition-obsidian .signature-strip {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #0f172a !important;
}

/* Card Edition Tab Buttons */
.card-edition-tab.active {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #0f172a !important;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
