:root {
    --bg-main: #0f172a; 
    --bg-card: #1e293b; 
    --bg-input: #020617;
    --accent: #22d3ee; 
    --text-main: #f1f5f9; 
    --text-muted: #94a3b8;
    --border: #334155; 
    --success: #34d399; 
    --warning: #fbbf24;
    --critical: #f87171; 
    --cta-purple: #a855f7;
}

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

body { 
    background-color: var(--bg-main); 
    color: var(--text-main); 
    font-family: system-ui, sans-serif; 
    padding: 2rem 1rem; 
}

.container { 
    max-width: 50rem; 
    margin: 0 auto; 
}

header { 
    text-align: center; 
    margin-bottom: 2rem; 
    position: relative; 
}

header h1 { 
    color: var(--accent); 
    margin-bottom: 0.5rem; 
}

.nav-btn { 
    position: absolute; 
    top: 0; 
    right: 0; 
    background: rgba(34, 211, 238, 0.1); 
    border: 1px solid var(--accent); 
    color: var(--accent); 
    padding: 0.5rem 1rem; 
    border-radius: 4px; 
    font-weight: 600; 
    text-decoration: none; 
    font-size: 0.85rem; 
}

.card { 
    background-color: var(--bg-card); 
    padding: 1.25rem; 
    border: 1px solid var(--border); 
    border-radius: 0.5rem; 
    margin-bottom: 1rem; 
}

.flex-group { 
    display: flex; 
    gap: 1rem; 
}

input { 
    flex: 1; 
    padding: 0.75rem; 
    background-color: var(--bg-input); 
    border: 1px solid var(--border); 
    border-radius: 0.375rem; 
    color: #fff; 
}

button { 
    background-color: var(--accent); 
    color: #020617; 
    font-weight: 700; 
    padding: 0.75rem 1.5rem; 
    border: none; 
    border-radius: 0.375rem; 
    cursor: pointer; 
}

button:disabled { 
    opacity: 0.5; 
} 

.hidden { 
    display: none; 
}

h2 { 
    margin-top: 1.5rem; 
    margin-bottom: 0.75rem; 
    color: #cbd5e1; 
}

.grid-4 { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 1rem; 
    margin-bottom: 1rem; 
}

table { 
    width: 100%; 
    border-collapse: collapse; 
    font-size: 0.85rem; 
    font-family: monospace; 
    margin-top: 0.5rem; 
}

th, td { 
    padding: 0.4rem; 
    text-align: left; 
} 

th { 
    border-bottom: 2px solid var(--border); 
} 

td { 
    border-bottom: 1px solid #334155; 
}

.error-msg { 
    color: var(--critical); 
    font-weight: bold; 
} 

.warn-msg { 
    color: var(--warning); 
    font-weight: bold; 
}

.raw-record { 
    font-size: 0.75rem; 
    color: var(--text-muted); 
    font-family: monospace; 
    background: #020617; 
    padding: 0.4rem; 
    border-radius: 4px; 
    margin-top: 0.5rem; 
    word-break: break-all; 
    white-space: pre-wrap; 
}

.cta-btn { 
    background-color: var(--cta-purple); 
    color: #fff; 
    padding: 0.6rem 1.2rem; 
    font-weight: bold; 
    border: none; 
    border-radius: 4px; 
    cursor: pointer; 
    float: right; 
    margin-top: -0.25rem; 
}

.cta-btn:hover { 
    background-color: #9333ea; 
}

.ad-container { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    gap: 2rem; 
    background: radial-gradient(circle at top left, #1e1b4b, #0f172a); 
    border: 1px solid #4338ca; 
    border-radius: 12px; 
    padding: 2rem; 
    margin-bottom: 2rem; 
    overflow: hidden; 
}

.ad-info { 
    flex: 1; 
}

.ad-info h2 { 
    color: #c084fc; 
    margin-top: 0; 
    font-size: 1.5rem; 
    font-weight: 800; 
}

.ad-info p { 
    color: #94a3b8; 
    font-size: 0.88rem; 
    line-height: 1.5; 
    margin: 0.5rem 0 1.5rem 0; 
}

.ad-link { 
    display: inline-block; 
    background: linear-gradient(135deg, #a855f7, #7c3aed); 
    color: #fff; 
    padding: 0.75rem 1.5rem; 
    font-weight: 700; 
    font-size: 0.9rem; 
    text-decoration: none; 
    border-radius: 6px; 
    box-shadow: 0 4px 14px rgba(168,85,247,0.4); 
    transition: transform 0.2s; 
}

.ad-link:hover { 
    transform: translateY(-2px); 
}

.box-stage { 
    width: 140px; 
    height: 180px; 
    perspective: 600px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

.box-3d { 
    width: 90px; 
    height: 140px; 
    position: relative; 
    transform-style: preserve-3d; 
    transform: rotateX(-15deg) rotateY(-25deg); 
    animation: subtleFloat 4s ease-in-out infinite; 
}

@keyframes subtleFloat { 
    0%, 100% { transform: rotateX(-15deg) rotateY(-25deg) translateY(0); } 
    50% { transform: rotateX(-15deg) rotateY(-20deg) translateY(-8px); } 
}

.face { 
    position: absolute; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    text-align: center; 
    border-radius: 2px; 
    box-shadow: inset 0 0 15px rgba(0,0,0,0.5); 
}

.front { 
    width: 90px; 
    height: 140px; 
    background: linear-gradient(135deg, #6366f1, #4f46e5); 
    border: 1px solid #818cf8; 
    transform: translateZ(15px); 
}

.back { 
    width: 90px; 
    height: 140px; 
    background: #312e81; 
    transform: rotateY(180deg) translateZ(15px); 
}

.right { 
    width: 30px; 
    height: 140px; 
    background: linear-gradient(to bottom, #4338ca, #3730a3); 
    border-left: 1px solid rgba(255,255,255,0.2); 
    transform: rotateY(90deg) translateZ(75px); 
}

.left { 
    width: 30px; 
    height: 140px; 
    background: #312e81; 
    transform: rotateY(-90deg) translateZ(15px); 
}

.top { 
    width: 90px; 
    height: 30px; 
    background: #4f46e5; 
    transform: rotateX(90deg) translateZ(15px); 
}

.bottom { 
    width: 90px; 
    height: 30px; 
    background: #1e1b4b; 
    transform: rotateX(-90deg) translateZ(125px); 
}

.front h3 { 
    font-size: 0.75rem; 
    color: #fff; 
    font-weight: 900; 
    letter-spacing: 0.5px; 
    padding: 0 0.5rem; 
    text-shadow: 0 2px 4px rgba(0,0,0,0.4); 
}

.front span { 
    font-size: 0.5rem; 
    color: #c7d2fe; 
    text-transform: uppercase; 
    font-weight: 700; 
    margin-top: 4px; 
}

.right-text { 
    transform: rotate(90deg); 
    white-space: nowrap; 
    font-size: 0.6rem; 
    color: #c7d2fe; 
    font-weight: 700; 
    letter-spacing: 1px; 
}
