/* ============================================================
   VARIABEL DESAIN (THEME)
   ============================================================ */
:root {
    /* Palet Warna Premium Dark Mode */
    --bg-base: #0f111a;
    --bg-panel: rgba(26, 30, 46, 0.6);
    --bg-panel-hover: rgba(35, 41, 63, 0.7);
    --border-glass: rgba(255, 255, 255, 0.08);

    /* Warna Aksen Vibrant */
    --accent-primary: #00f0ff;
    /* Neon Cyan */
    --accent-secondary: #ff007f;
    /* Neon Pink */
    --accent-success: #00ff88;
    --accent-danger: #ff3366;

    /* Tipografi */
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dark: #0f111a;

    /* Font Families */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Transisi */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadow */
    --glow-primary: 0 0 20px rgba(0, 240, 255, 0.3);
    --glow-secondary: 0 0 20px rgba(255, 0, 127, 0.3);
}

/* ============================================================
   RESET BASE
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Animasi Abstrak */
.bg-animated {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at center, #151a2a 0%, #0f111a 100%);
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out;
}

.glow-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.15) 0%, transparent 70%);
}

.glow-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(255, 0, 127, 0.1) 0%, transparent 70%);
    animation-delay: -5s;
}

.glow-3 {
    top: 40%;
    left: 40%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.05) 0%, transparent 70%);
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-30px, 20px) scale(0.9);
    }
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1,
h2,
h3,
h4 {
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #fff;
}

.accent-text {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

/* ============================================================
   LAYOUT CONTAINER
   ============================================================ */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ============================================================
   GLASSMORPHISM COMPONENTS
   ============================================================ */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    padding: 2rem;
}

/* ============================================================
   HEADER
   ============================================================ */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.05) 0%, rgba(255, 0, 127, 0.05) 100%);
    border: 1px solid rgba(0, 240, 255, 0.1);
}

.header-content h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.header-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.header-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 600px;
}

.app-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}
}

.header-badges {
    display: flex;
    gap: 0.75rem;
}

.badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent-primary);
}

/* ============================================================
   INPUT PANEL
   ============================================================ */
.panel-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 1rem;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.control-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
    margin: -0.3rem 0 0.3rem 0;
    line-height: 1.4;
}

.control-group.full-width {
    grid-column: 1 / -1;
}

label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* Input Fields */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

input[type="text"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 1rem;
    padding-right: 4rem;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    letter-spacing: 2px;
    transition: var(--transition-smooth);
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.1);
}

.length-indicator {
    position: absolute;
    right: 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.length-indicator.valid {
    color: var(--accent-success);
}

.length-indicator.invalid {
    color: var(--accent-danger);
}

.helper-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Radio Buttons UI Custom */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: transparent;
    border-radius: 8px;
    padding: 0;
    border: none;
}

.radio-group input[type="radio"] {
    display: none;
}

.radio-group label {
    flex: auto;
    text-align: left;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition-fast);
    border: 1px solid var(--border-glass);
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.radio-group label:hover {
    background: rgba(0, 0, 0, 0.3);
}

.radio-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--text-muted);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.radio-group input[type="radio"]:checked+label {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(255, 0, 127, 0.1));
    color: #fff;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 1px var(--accent-primary);
}

.radio-group input[type="radio"]:checked+label .radio-icon {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    flex: 1;
}

.btn .icon {
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), #00b3ff);
    color: var(--text-dark);
}

.btn-primary:hover {
    box-shadow: var(--glow-primary);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-danger {
    background: transparent;
    color: var(--accent-danger);
    border: 1px solid rgba(255, 51, 102, 0.3);
    flex: 0.5;
}

.btn-danger:hover {
    background: rgba(255, 51, 102, 0.1);
    border-color: var(--accent-danger);
}

.error-message {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 51, 102, 0.1);
    border: 1px solid rgba(255, 51, 102, 0.3);
    border-radius: 8px;
    color: var(--accent-danger);
}

/* ============================================================
   PANEL HEADER & DESCRIPTIONS
   ============================================================ */
.panel-header {
    margin-bottom: 1.5rem;
}

.panel-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.panel-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ============================================================
   EXPLANATION BOXES (Educational Styling)
   ============================================================ */
.explanation-box {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.05) 0%, rgba(255, 0, 127, 0.05) 100%);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 10px;
    margin-bottom: 2rem;
}

.explanation-icon {
    font-size: 2rem;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.explanation-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.explanation-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.explanation-list {
    font-size: 0.9rem;
    color: var(--text-muted);
    list-style: none;
    margin: 0.5rem 0;
}

.explanation-list li {
    padding: 0.3rem 0 0.3rem 1.5rem;
    position: relative;
}

.explanation-list li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
}

/* ============================================================
   OUTPUT STYLING
   ============================================================ */
.output-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.output-box {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.output-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.output-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

background: rgba(255, 51, 102, 0.1);
border-left: 4px solid var(--accent-danger);
color: #fff;
border-radius: 4px;
font-size: 0.9rem;
}

.hidden {
    display: none !important;
}

/* ============================================================
   RESULTS SECTION
   ============================================================ */
.results-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: slideUp 0.5s ease-out forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.final-output-panel {
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 240, 255, 0.05);
}

.output-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.output-box h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.code-block {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 1.25rem;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--accent-success);
    word-break: break-all;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
}

.code-block::after {
    content: "COPY";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--text-dark);
    color: var(--accent-primary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    opacity: 0;
    transition: var(--transition-fast);
}

.code-block:hover {
    border-color: rgba(0, 255, 136, 0.5);
    background: rgba(0, 255, 136, 0.05);
}

.code-block:hover::after {
    opacity: 1;
}

/* ============================================================
   TABS & DATA VISUALIZATION
   ============================================================ */
.tabs-container {
    padding: 0;
    overflow: hidden;
}

.tabs-header {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-glass);
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 1.2rem;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    border-bottom: 2px solid transparent;
}

.tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
    background: rgba(0, 240, 255, 0.05);
}

.tabs-body {
    padding: 2rem;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.explanation-box {
    background: rgba(255, 255, 255, 0.03);
    border-left: 4px solid var(--accent-secondary);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ============================================================
   TABLES
   ============================================================ */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-align: left;
}

.data-table th,
.data-table td {
    padding: 0.8rem;
    border-bottom: 1px solid var(--border-glass);
}

.data-table th {
    background: rgba(0, 0, 0, 0.2);
    color: var(--accent-primary);
    font-weight: 600;
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.75rem;
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Color coding bits */
.bit-c {
    color: #ffae00;
}

.bit-d {
    color: #00f0ff;
}

.bit-k {
    color: #ff007f;
}

/* ============================================================
   ACCORDION (For Rounds)
   ============================================================ */
.accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.accordion-item {
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.15);
}

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    color: #fff;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.accordion-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-item.active .accordion-header {
    border-bottom: 1px solid var(--border-glass);
}

.accordion-content {
    display: none;
    padding: 1.5rem;
}

.accordion-item.active .accordion-content {
    display: block;
    animation: fadeIn 0.3s;
}

/* Round Detail Layout */
.round-detail-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1rem;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.rd-label {
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    text-transform: uppercase;
}

.rd-value {
    letter-spacing: 1px;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem;
    border-radius: 4px;
    word-break: break-all;
}

.rd-divider {
    grid-column: 1 / -1;
    height: 1px;
    background: var(--border-glass);
    margin: 0.5rem 0;
}

/* ============================================================
   KEY SCHEDULE INITIAL DETAILS
   ============================================================ */
.ks-initial-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-glass);
}

.ks-detail-card {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.05) 0%, rgba(255, 0, 127, 0.05) 100%);
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: 8px;
    transition: all var(--transition-smooth);
}

.ks-detail-card:hover {
    border-color: rgba(0, 240, 255, 0.4);
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1) 0%, rgba(255, 0, 127, 0.08) 100%);
    transform: translateY(-2px);
}

.ks-card-number {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.ks-detail-card h4 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
    color: #fff;
}

.ks-subtext {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 1rem;
    display: block;
}

.ks-split-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.ks-split-grid>div {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ks-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ks-label.bit-c {
    color: #FFB900;
}

.ks-label.bit-d {
    color: #00F0FF;
}

.ks-value {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    word-break: break-all;
    letter-spacing: 1px;
    line-height: 1.4;
}

.ks-explanation {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--font-sans);
    margin-top: 0.3rem;
    display: block;
}

.ks-rounds-title {
    font-size: 1.1rem;
    margin: 1.5rem 0 0.3rem 0;
    color: #fff;
}

.ks-rounds-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* ============================================================
   KEY SCHEDULE ACCORDION VISUALIZATION
   ============================================================ */
.ks-rounds-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.ks-round-item {
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.15);
    transition: all var(--transition-fast);
}

.ks-round-item:hover {
    border-color: rgba(0, 240, 255, 0.3);
    background: rgba(0, 0, 0, 0.2);
}

.ks-round-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    color: #fff;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.ks-round-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.ks-round-header .round-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.ks-round-number {
    font-weight: 700;
    color: var(--accent-primary);
    min-width: 50px;
    font-size: 1rem;
}

.ks-shift-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.3rem 0.6rem;
    border-radius: 3px;
    display: flex;
    gap: 0.3rem;
}

.ks-icon {
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.ks-round-item.active .ks-icon {
    transform: rotate(180deg);
    color: var(--accent-primary);
}

.ks-round-item.active .ks-round-header {
    border-bottom: 1px solid var(--border-glass);
}

.ks-round-content {
    display: none;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.1);
}

.ks-round-item.active .ks-round-content {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Key Schedule Round Detail Layout */
.ks-round-detail {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    font-family: var(--font-mono);
}

.ks-detail-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ks-detail-label {
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.ks-detail-value {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    word-break: break-all;
    line-height: 1.5;
    letter-spacing: 1px;
    border-left: 2px solid rgba(0, 240, 255, 0.2);
}

.ks-detail-value.bit-c {
    border-left-color: rgba(0, 240, 255, 0.5);
}

.ks-detail-value.bit-d {
    border-left-color: rgba(255, 0, 127, 0.5);
}

.ks-detail-value.bit-k {
    border-left-color: rgba(0, 255, 136, 0.5);
}

/* For single column layout on mobile */
@media (max-width: 768px) {
    .ks-round-detail {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   S-BOX VISUALIZATION
   ============================================================ */
.round-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modern-select {
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    border: 1px solid var(--border-glass);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-family: var(--font-sans);
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.modern-select option {
    background: var(--bg-base);
}

.sbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.sbox-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 1.5rem;
    transition: var(--transition-smooth);
}

.sbox-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 0, 127, 0.3);
    box-shadow: 0 5px 15px rgba(255, 0, 127, 0.05);
}

.sb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.sb-title {
    font-weight: 700;
    color: var(--accent-secondary);
}

.sb-input {
    font-family: var(--font-mono);
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
}

.sb-detail {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.sb-detail strong {
    color: #fff;
}

.sb-output {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    text-align: center;
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: var(--accent-success);
    font-weight: bold;
    letter-spacing: 3px;
}

/* ============================================================
   RESPONSIVENESS
   ============================================================ */
@media (max-width: 768px) {
    .input-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .output-grid {
        grid-template-columns: 1fr;
    }

    .app-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .round-detail-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .rd-label {
        margin-top: 0.5rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* ============================================================
   KEY SCHEDULE VISUALIZATION
   ============================================================ */
.ks-initial-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.ks-detail-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 1.5rem;
}

.ks-detail-card h4 {
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.ks-subtext {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.ks-value {
    font-family: var(--font-mono);
    letter-spacing: 2px;
    word-break: break-all;
}

.ks-split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.ks-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.ks-rounds-title {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.5rem;
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */
@media (max-width: 1024px) {
    .input-grid {
        grid-template-columns: 1fr;
    }

    .ks-initial-details {
        grid-template-columns: 1fr;
    }

    .output-grid {
        grid-template-columns: 1fr;
    }

    .app-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .app-container {
        padding: 1rem;
        gap: 1rem;
    }

    .glass-panel {
        padding: 1.5rem;
    }

    .header-content h1 {
        font-size: 1.8rem;
    }

    .header-badges {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }

    .input-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .action-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }

    .ks-initial-details {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .ks-detail-card {
        padding: 1rem;
    }

    .ks-split-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .output-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .output-box {
        gap: 0.5rem;
    }

    .code-block {
        font-size: 0.75rem;
        padding: 0.75rem;
    }

    .explanation-box {
        flex-direction: column;
        gap: 1rem;
    }

    .explanation-icon {
        font-size: 1.5rem;
        min-width: auto;
    }

    .ks-round-header {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .ks-round-number {
        min-width: 40px;
        font-size: 0.9rem;
    }

    .tabs-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .tab-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}