:root {
    --deep-blue: #0A1428;
    --court-gold: #D4B866;
    --science-cyan: #4ECDC4;
    --light-white: rgba(255, 255, 255, 0.87);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glow-cyan: rgba(78, 205, 196, 0.5);
    --glow-gold: rgba(212, 184, 102, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', 'Inter', sans-serif;
    background-color: var(--deep-blue);
    color: var(--light-white);
    overflow-x: hidden;
    min-height: 100vh;
}

.nav-group:hover .nav-dropdown,
.nav-group:focus-within .nav-dropdown {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

#navigation-container nav {
    z-index: 2000 !important;
    overflow: visible !important;
}

.nav-group > button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-chevron {
    flex: none;
    opacity: 0.7;
    transition: transform 160ms ease, opacity 160ms ease;
}

.nav-group:hover .nav-chevron,
.nav-group:focus-within .nav-chevron {
    transform: rotate(180deg);
    opacity: 1;
}

.nav-dropdown {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    z-index: 2100 !important;
}

.nav-dropdown > div {
    background: #101c30 !important;
    backdrop-filter: none !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55) !important;
}

.auth-actions { align-items: center !important; }
.nav-register { line-height: 1 !important; vertical-align: middle; transform: none !important; }

.font-orbitron {
    font-family: 'Orbitron', sans-serif;
}

.page-section {
    min-height: 0;
    padding: 52px 20px;
    position: relative;
    overflow: hidden;
}

body > #hero.page-section {
    min-height: 390px;
    padding-top: 138px;
    padding-bottom: 48px;
}

.page-section + .page-section {
    padding-top: 40px;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    border-color: rgba(78, 205, 196, 0.3);
    box-shadow: 0 0 30px rgba(78, 205, 196, 0.15), inset 0 0 30px rgba(78, 205, 196, 0.05);
    transform: translateY(-2px);
}

.court-button {
    position: relative;
    padding: 16px 40px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.2), rgba(212, 184, 102, 0.1));
    border: 1px solid rgba(78, 205, 196, 0.4);
    border-radius: 8px;
    color: var(--science-cyan);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.court-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.4), 0 0 40px rgba(212, 184, 102, 0.2);
    border-color: rgba(212, 184, 102, 0.6);
    color: var(--court-gold);
}

.court-button:hover::before {
    left: 100%;
}

.court-button:active {
    animation: court-shake 0.3s ease;
}

.court-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

@keyframes court-shake {
    0%, 100% { transform: translateY(-2px); }
    25% { transform: translateY(-2px) translateX(-2px); }
    50% { transform: translateY(-2px) translateX(2px); }
    75% { transform: translateY(-2px) translateX(-2px); }
}

.glow-text-cyan {
    text-shadow: 0 0 20px rgba(78, 205, 196, 0.5), 0 0 40px rgba(78, 205, 196, 0.3);
}

.glow-text-gold {
    text-shadow: 0 0 20px rgba(212, 184, 102, 0.5), 0 0 40px rgba(212, 184, 102, 0.3);
}

.gradient-text {
    background: linear-gradient(90deg, var(--science-cyan), var(--court-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(78, 205, 196, 0.6);
    border-radius: 50%;
    animation: particle-float 15s linear infinite;
}

@keyframes particle-float {
    0% { transform: translateY(100vh) translateX(0) scale(1); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.8; }
    100% { transform: translateY(-100vh) translateX(100px) scale(0.5); opacity: 0; }
}

.light-ray {
    position: absolute;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(78, 205, 196, 0.3), transparent);
    animation: ray-pulse 4s ease-in-out infinite;
}

@keyframes ray-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

.float-animation-delay {
    animation: float 6s ease-in-out infinite;
    animation-delay: 2s;
}

.float-animation-delay-2 {
    animation: float 6s ease-in-out infinite;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes star-flow {
    0% { 
        transform: translateX(0) translateY(0) rotate(0deg);
        opacity: 0.03;
    }
    25% {
        transform: translateX(calc(var(--flow-direction) * 50px)) translateY(-30px) rotate(5deg);
        opacity: 0.1;
    }
    50% { 
        transform: translateX(calc(var(--flow-direction) * 100px)) translateY(0) rotate(0deg);
        opacity: 0.05;
    }
    75% {
        transform: translateX(calc(var(--flow-direction) * 50px)) translateY(30px) rotate(-5deg);
        opacity: 0.08;
    }
    100% { 
        transform: translateX(0) translateY(0) rotate(0deg);
        opacity: 0.03;
    }
}

.fade-in-up {
    animation: fade-in-up 0.8s ease-out forwards;
    opacity: 0;
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(78, 205, 196, 0.3); }
    50% { box-shadow: 0 0 40px rgba(78, 205, 196, 0.6); }
}

.typing-indicator span {
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.tab-content {
    display: none;
    animation: fade-in 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-dot.active {
    background: var(--science-cyan);
    box-shadow: 0 0 10px var(--science-cyan);
    transform: scale(1.2);
}

.progress-bar {
    background: linear-gradient(90deg, var(--science-cyan), var(--court-gold));
    transition: width 0.5s ease;
}

.witness-card {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(212, 184, 102, 0.05));
    border: 1px solid rgba(78, 205, 196, 0.2);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.witness-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--science-cyan), transparent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.witness-card:hover::after {
    transform: scaleX(1);
}

.witness-card.active {
    border-color: var(--court-gold);
    box-shadow: 0 0 20px rgba(212, 184, 102, 0.3);
}

.evidence-item {
    transition: all 0.3s ease;
}

.evidence-item:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(78, 205, 196, 0.2);
}

.scroll-indicator {
    animation: bounce 2s infinite;
}

.hero-court-title {
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 0.98;
    max-width: 100%;
    overflow-wrap: normal;
}

.archive-search-column {
    display: flex;
    align-items: flex-end;
    padding-top: 22px;
}

.archive-search-field {
    height: 66px;
    padding-left: 60px !important;
}

.filing-search-field {
    min-width: min(420px, 42vw);
    padding-left: 48px !important;
}

.branch-court-label {
    margin-top: -10px;
    margin-bottom: 14px;
}

@media (max-width: 1023px) {
    .archive-search-column { padding-top: 0; }
    .archive-search-field { height: 54px; }
}

@media (max-width: 768px) {
    .filing-search-field { min-width: 0; width: 100%; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
}

.slider-thumb::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--science-cyan);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px var(--science-cyan);
    transition: all 0.3s ease;
}

.slider-thumb::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 20px var(--science-cyan);
}

.case-card {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.08), rgba(212, 184, 102, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.case-card:hover {
    transform: translateY(-8px);
    border-color: rgba(78, 205, 196, 0.3);
    box-shadow: 0 20px 40px rgba(78, 205, 196, 0.15);
}

.timeline-line {
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--science-cyan), var(--court-gold));
}

.concept-watermark {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.08);
    writing-mode: vertical-rl;
    letter-spacing: 4px;
    z-index: 100;
    pointer-events: none;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}

.badge-cyan {
    background: rgba(78, 205, 196, 0.1);
    color: var(--science-cyan);
    border: 1px solid rgba(78, 205, 196, 0.2);
}

.badge-gold {
    background: rgba(212, 184, 102, 0.1);
    color: var(--court-gold);
    border: 1px solid rgba(212, 184, 102, 0.2);
}

.badge-green {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.badge-red {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.2);
}

.badge-purple {
    background: rgba(192, 132, 252, 0.1);
    color: #c084fc;
    border: 1px solid rgba(192, 132, 252, 0.2);
}

.badge-blue {
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.badge-orange {
    background: rgba(251, 146, 60, 0.1);
    color: #fb923c;
    border: 1px solid rgba(251, 146, 60, 0.2);
}

.input-field {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--light-white);
    font-family: inherit;
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none;
}

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

.input-field:focus {
    border-color: rgba(78, 205, 196, 0.5);
    box-shadow: 0 0 15px rgba(78, 205, 196, 0.15);
}

.input-field.error {
    border-color: rgba(248, 113, 113, 0.5);
    box-shadow: 0 0 15px rgba(248, 113, 113, 0.15);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.form-error {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #f87171;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(10, 20, 40, 0.95);
    border: 1px solid rgba(78, 205, 196, 0.3);
    border-radius: 16px;
    padding: 24px;
    max-width: 90%;
    width: 480px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.modal-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--light-white);
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 4px;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--light-white);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(78, 205, 196, 0.2);
    border-top-color: var(--science-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 2000;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 400px;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: #4ade80;
}

.notification-error {
    background: rgba(248, 113, 113, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #f87171;
}

.notification-info {
    background: rgba(96, 165, 250, 0.15);
    border: 1px solid rgba(96, 165, 250, 0.3);
    color: #60a5fa;
}

.empty-state {
    text-align: center;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--science-cyan);
    color: var(--deep-blue);
    padding: 8px 16px;
    z-index: 1000;
    font-weight: 600;
    border-radius: 0 0 8px 0;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

:focus-visible {
    outline: 2px solid var(--science-cyan);
    outline-offset: 2px;
    border-radius: 4px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--science-cyan);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .particle-container {
        display: none;
    }
    
    .light-ray {
        display: none;
    }
    
    .float-animation,
    .float-animation-delay,
    .float-animation-delay-2 {
        animation: none;
    }
    
    .fade-in-up {
        animation: none;
        opacity: 1;
    }
    
    .pulse-glow {
        animation: none;
    }
    
    .scroll-indicator {
        animation: none;
    }
}

@media (prefers-contrast: high) {
    :root {
        --glass-bg: rgba(255, 255, 255, 0.15);
        --glass-border: rgba(255, 255, 255, 0.3);
    }
    
    .court-button {
        border-width: 2px;
    }
    
    .input-field {
        border-width: 2px;
    }
    
    .glass-card {
        border-width: 2px;
    }
}

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

@media (pointer: coarse) {
    .court-button {
        min-height: 48px;
        min-width: 120px;
        padding: 16px 24px;
        font-size: 16px;
    }
    
    .nav-link {
        min-height: 44px;
        padding: 12px 16px;
    }
    
    .input-field {
        min-height: 48px;
        font-size: 16px;
    }
    
    .badge {
        padding: 8px 16px;
        font-size: 14px;
    }
}

@media (max-width: 390px) {
    .page-section {
        padding: 36px 12px;
    }
    
    .court-button {
        width: 100%;
        padding: 14px 20px;
    }
    
    .glass-card {
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .page-section {
        padding: 40px 16px;
    }

    body > #hero.page-section { min-height: 320px; padding-top: 112px; padding-bottom: 36px; }
}

@media (min-width: 1440px) {
    .container {
        max-width: 1440px;
    }
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.empty-state-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--light-white);
    margin-bottom: 8px;
}

.empty-state-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

.card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.text-cyan { color: var(--science-cyan); }
.text-gold { color: var(--court-gold); }
.text-white-50 { color: rgba(255, 255, 255, 0.5); }
.text-white-60 { color: rgba(255, 255, 255, 0.6); }
.text-white-70 { color: rgba(255, 255, 255, 0.7); }

.bg-cyan-10 { background: rgba(78, 205, 196, 0.1); }
.bg-gold-10 { background: rgba(212, 184, 102, 0.1); }

.border-cyan-30 { border-color: rgba(78, 205, 196, 0.3); }
.border-gold-30 { border-color: rgba(212, 184, 102, 0.3); }

@media (max-width: 768px) {
    .font-orbitron {
        font-size: 1.25rem !important;
    }
    
    .court-button {
        padding: 12px 24px;
        font-size: 0.875rem;
    }
    
    .page-section {
        padding: 40px 10px;
    }

    .timeline-line {
        left: 16px;
    }

    .modal-content {
        width: 95%;
        padding: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

:focus-visible {
    outline: 2px solid var(--science-cyan);
    outline-offset: 4px;
}

:focus:not(:focus-visible) {
    outline: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--science-cyan);
    outline-offset: 3px;
}

@media (prefers-contrast: high) {
    :root {
        --deep-blue: #000033;
        --court-gold: #FFD700;
        --science-cyan: #00FFFF;
        --light-white: #FFFFFF;
        --glass-bg: rgba(255, 255, 255, 0.15);
        --glass-border: rgba(255, 255, 255, 0.3);
    }
    
    .glass-card {
        border-width: 2px;
        background: rgba(255, 255, 255, 0.1);
    }
    
    .court-button {
        border-width: 2px;
        border-color: var(--science-cyan);
        color: var(--science-cyan);
    }
    
    .editor-toolbar .action-btn {
        border-width: 1px;
        border-color: rgba(255, 255, 255, 0.3);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .float-animation,
    .float-animation-delay,
    .float-animation-delay-2,
    .pulse-glow,
    .wave-ring {
        animation: none !important;
    }
    
    .court-button:hover::before {
        animation: none;
        left: 0;
    }
    
    .court-button:active {
        animation: none;
    }
}

.action-btn,
.court-button {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 24px;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    min-height: 44px;
    padding: 10px 14px;
}

.footer-tab {
    min-height: 44px;
    min-width: 44px;
    padding: 10px 16px;
}

.search-result-item,
.item-card {
    min-height: 44px;
}

.tab-btn {
    min-height: 44px;
    min-width: 44px;
}

.clerk-item {
    min-height: 44px;
    display: flex;
    align-items: center;
}

:root {
    color-scheme: dark;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
}

button {
    font-family: inherit;
    font-size: inherit;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

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

.act-card {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.08), rgba(212, 184, 102, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.act-card:hover {
    border-color: rgba(78, 205, 196, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(78, 205, 196, 0.15);
}

.act-card.active {
    border-color: var(--science-cyan);
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.15), rgba(212, 184, 102, 0.05));
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.2);
}

.card-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    font-weight: 700;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 12px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--science-cyan), var(--court-gold));
    border-radius: 2px;
    transition: width 0.5s ease;
}

.evidence-item-unlocked {
    transition: all 0.3s ease;
}

.evidence-item-unlocked:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(78, 205, 196, 0.2);
}

.evidence-item-locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.control-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(78, 205, 196, 0.15);
    border-color: rgba(78, 205, 196, 0.3);
    color: var(--science-cyan);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: rgba(78, 205, 196, 0.1);
    border-color: rgba(78, 205, 196, 0.2);
    color: var(--science-cyan);
}

.court-room-bg {
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(78, 205, 196, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(212, 184, 102, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(100, 116, 139, 0.05) 0%, transparent 70%);
}

.wave-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 50%;
    animation: wave-expand 2s infinite;
}

@keyframes wave-expand {
    0% {
        width: 100px;
        height: 100px;
        opacity: 0.8;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

.writing-mode-vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.lab-card {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.08), rgba(212, 184, 102, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.lab-card:hover {
    border-color: rgba(78, 205, 196, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(78, 205, 196, 0.15);
}

.lab-card.active {
    border-color: var(--science-cyan);
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.15), rgba(212, 184, 102, 0.05));
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.2);
}

.filter-group label {
    font-size: 12px;
    font-weight: 500;
}

.filter-select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

.filter-select:focus {
    border-color: rgba(78, 205, 196, 0.5);
    box-shadow: 0 0 15px rgba(78, 205, 196, 0.15);
}

.filter-select option {
    background: #0a1428;
    color: rgba(255, 255, 255, 0.8);
}

.filter-tag {
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tag:hover {
    background: rgba(78, 205, 196, 0.1);
    border-color: rgba(78, 205, 196, 0.2);
    color: var(--science-cyan);
}

.filter-tag.active {
    background: rgba(78, 205, 196, 0.15);
    border-color: var(--science-cyan);
    color: var(--science-cyan);
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: rgba(78, 205, 196, 0.1);
    border-color: rgba(78, 205, 196, 0.2);
    color: var(--science-cyan);
}

.tab-btn.active {
    background: rgba(78, 205, 196, 0.15);
    border-color: var(--science-cyan);
    color: var(--science-cyan);
}

.case-card-lg {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.08), rgba(212, 184, 102, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.case-card-lg:hover {
    border-color: rgba(78, 205, 196, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(78, 205, 196, 0.15);
}

.case-card-lg .card-image {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(212, 184, 102, 0.05));
}

.case-card-lg .card-content {
    padding: 20px;
}

.editor-container {
    display: grid;
    grid-template-areas:
        "toolbar toolbar toolbar"
        "toolbox workspace preview"
        "tabs tabs tabs";
    grid-template-columns: 240px 1fr 320px;
    grid-template-rows: auto 1fr auto;
    height: calc(100vh - 80px);
}

.editor-toolbar { grid-area: toolbar; }
.editor-toolbox { grid-area: toolbox; }
.editor-workspace { grid-area: workspace; }
.editor-preview { grid-area: preview; }
.editor-tabs { grid-area: tabs; }

@media (max-width: 1200px) {
    .editor-container {
        grid-template-areas:
            "toolbar"
            "workspace"
            "preview"
            "tabs";
        grid-template-columns: 1fr;
        grid-template-rows: auto 400px 300px auto;
    }
    .editor-toolbox { display: none; }
}

.editor-toolbar {
    background: rgba(10, 20, 40, 0.9);
    border-bottom: 1px solid rgba(78, 205, 196, 0.2);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.editor-toolbar .action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.editor-toolbar .action-btn:hover {
    background: rgba(78, 205, 196, 0.1);
    border-color: rgba(78, 205, 196, 0.2);
    color: var(--science-cyan);
}

.editor-toolbar .court-button {
    padding: 8px 20px;
    font-size: 13px;
}

.editor-toolbox {
    background: rgba(10, 20, 40, 0.95);
    border-right: 1px solid rgba(78, 205, 196, 0.2);
    overflow-y: auto;
}

.editor-workspace {
    background: rgba(10, 20, 40, 0.4);
}

.editor-preview {
    padding: 16px;
    display: flex;
    flex-direction: column;
    background: rgba(10, 20, 40, 0.6);
}

.editor-tabs {
    background: rgba(10, 20, 40, 0.9);
    border-top: 1px solid rgba(78, 205, 196, 0.2);
}

.footer-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.footer-tab:hover {
    background: rgba(78, 205, 196, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.footer-tab.active {
    background: rgba(78, 205, 196, 0.15);
    color: var(--science-cyan);
}

.tab-content {
    display: none;
    padding: 16px;
    max-height: 200px;
    overflow-y: auto;
}

.tab-content.active {
    display: block;
}

.tab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.tab-header h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--light-white);
}

.item-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.item-name {
    color: white;
    font-size: 13px;
}

.item-actions {
    display: flex;
    gap: 8px;
}

.edit-btn, .delete-btn {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.3s ease;
}

.edit-btn:hover {
    color: var(--science-cyan);
}

.delete-btn:hover {
    color: #f87171;
}

.add-item-btn {
    background: rgba(78, 205, 196, 0.1);
    border: 1px solid rgba(78, 205, 196, 0.3);
    color: var(--science-cyan);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.add-item-btn:hover {
    background: rgba(78, 205, 196, 0.2);
}

.autosave-status {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-left: 12px;
}

.stage-preview-container {
    background: rgba(10, 20, 40, 0.9);
    border: 1px solid rgba(78, 205, 196, 0.2);
    border-radius: 12px;
    overflow: hidden;
    flex: 1;
}

.html-prototype-badge {
    background: rgba(212, 184, 102, 0.15);
    border: 1px solid rgba(212, 184, 102, 0.3);
    color: var(--court-gold);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.block-search-panel {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    max-width: 90vw;
    background: rgba(10, 20, 40, 0.98);
    border: 1px solid rgba(78, 205, 196, 0.3);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 10000;
}

.block-search-panel.visible {
    display: block;
}

.search-header {
    display: flex;
    padding: 16px;
    border-bottom: 1px solid rgba(78, 205, 196, 0.2);
}

.search-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(78, 205, 196, 0.3);
    border-radius: 8px;
    padding: 10px 14px;
    color: white;
    font-size: 14px;
    outline: none;
}

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

.search-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    cursor: pointer;
    padding: 0 8px;
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
}

.search-result-item:hover {
    background: rgba(78, 205, 196, 0.1);
}

.result-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 12px;
}

.result-info {
    flex: 1;
}

.result-name {
    color: white;
    font-size: 14px;
}

.result-category {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.onboarding-content {
    background: rgba(10, 20, 40, 0.95);
    border: 1px solid rgba(78, 205, 196, 0.3);
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    text-align: center;
}

.onboarding-content h2 {
    color: var(--court-gold);
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    margin-bottom: 16px;
}

.onboarding-content p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
}

.onboarding-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.onboarding-btn {
    background: rgba(78, 205, 196, 0.1);
    border: 1px solid rgba(78, 205, 196, 0.3);
    color: white;
    padding: 14px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.onboarding-btn:hover {
    background: rgba(78, 205, 196, 0.2);
    border-color: rgba(78, 205, 196, 0.5);
}

.onboarding-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.no-results {
    padding: 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}
