/* ============================================================
   Cyber Lab — Cipher Wheel & Vigenère Styles
   ============================================================ */

/* --- Cipher Wheel --- */
.wheel-wrapper {
    position: relative;
    width: 340px;
    height: 340px;
    margin: 0 auto;
    max-width: 100%;
}

.wheel {
    position: absolute;
    border-radius: 50%;
    border: 2px solid var(--primary-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s ease;
}

.outer-wheel {
    width: 340px;
    height: 340px;
    background: var(--primary-purple);
    color: white;
    max-width: 100%;
    max-height: 100%;
}

.inner-wheel {
    width: 240px;
    height: 240px;
    background: white;
    color: var(--accent-magenta);
    top: 50px;
    left: 50px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}

.letter {
    position: absolute;
    font-weight: bold;
    font-family: 'Montserrat', monospace;
    font-size: 1.1rem;
}

.check-input {
    width: 45px;
    height: 45px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1.2rem;
    text-transform: uppercase;
    padding: 0;
    margin-bottom: 0;
}

.input-row {
    display: flex;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

@media (max-width: 400px) {
    .wheel-wrapper {
        transform: scale(0.85);
        transform-origin: center top;
        margin-bottom: -40px;
    }
    .check-input { width: 35px; height: 35px; font-size: 1rem; }
}

/* --- Vigenère Table --- */
.v-table-wrap {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

.v-table {
    border-collapse: collapse;
    font-family: monospace;
    font-size: 11px;
    margin: 0 auto;
    min-width: max-content;
}

.v-table td {
    width: 25px;
    height: 25px;
    text-align: center;
    border: 1px solid #eee;
    padding: 2px;
}

.header-cell     { background: #eee; font-weight: bold; }
.highlight-row   { background: rgba(0, 171, 199, 0.15); }
.highlight-col   { background: rgba(233, 30, 99, 0.15); }
.highlight-intersect {
    background: var(--accent-magenta) !important;
    color: white;
    font-weight: bold;
}

/* --- Vigenère axis labels --- */
.axis-label-key {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-align: center;
    font-weight: bold;
    padding-right: 15px;
    color: var(--accent-magenta);
    display: flex;
    justify-content: center;
    letter-spacing: 2px;
}

.axis-label-word {
    text-align: center;
    font-weight: bold;
    padding-bottom: 10px;
    color: var(--accent-teal);
    letter-spacing: 2px;
}

/* ── Wheel: letter tick lines ──────────────────────────────── */
.wheel-tick {
    position: absolute;
    width: 1px;
    background: rgba(255,255,255,0.25);
    transform-origin: bottom center;
    pointer-events: none;
}
.outer-wheel .wheel-tick { height: 14px; bottom: 50%; left: 50%; }
.inner-wheel .wheel-tick { height: 10px; background: rgba(45,27,78,0.25); bottom: 50%; left: 50%; }

/* ── Translator: equal-height three-panel layout ───────────── */
.trans-container {
    align-items: stretch !important;
}

.trans-panel,
.trans-panel-center {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.trans-panel textarea {
    flex: 1;
    min-height: 160px;
    resize: none;
}

/* Middle panel accent */
.trans-panel-center {
    background: var(--primary-purple) !important;
    color: white;
    border-top-color: var(--accent-teal) !important;
}

.trans-panel-center h3 {
    color: white;
    margin-bottom: 12px;
    font-size: 1rem;
}

.trans-panel-center label,
.trans-panel-center #l-param {
    color: rgba(255,255,255,0.75) !important;
    font-size: 0.8rem;
    display: block;
    margin-bottom: 4px;
}

.trans-panel-center select,
.trans-panel-center input {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.25);
    color: white;
}

.trans-panel-center p {
    color: rgba(255,255,255,0.6) !important;
}

html[data-theme="dark"] .trans-panel-center {
    background: #3d1f7a !important;
}
