/* bash.css - Linux Shell Hero game styles */
body {
    background-color: #f8fafc;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

.bash-container {
    max-width: 950px;
    margin: 15px auto;
    padding: 10px 20px;
    text-align: center;
}

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

.btn-back {
    text-decoration: none;
    color: #f59e0b;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.btn-back:hover {
    color: #d97706;
}

.btn-help {
    background: none;
    border: none;
    color: #64748b;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.btn-help:hover {
    color: #475569;
}

.bash-title-area {
    margin-bottom: 10px;
}

.bash-title {
    font-size: 1.8rem;
    color: #1e293b;
    font-weight: 800;
    margin: 0;
}

.bash-title span {
    color: #f59e0b;
    font-weight: 300;
    display: block;
    font-size: 1.1rem;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Stats panel */
.bash-stats {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 12px 20px;
    margin-bottom: 15px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-item .label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-item .value {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1e293b;
}

.stat-item .value.text-amber {
    color: #f59e0b;
}

.stat-item .value.text-red {
    color: #ef4444;
}

/* Arena Grid Layout */
.bash-arena {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 20px;
    margin-bottom: 15px;
}

/* Retro Shell Panel (Left) */
.shell-panel {
    background: #05070a;
    border: 1px solid #1e293b;
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    text-align: left;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    height: 330px;
    display: flex;
    flex-direction: column;
}

.shell-header {
    background: #0f131a;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #1e293b;
}

.shell-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-red { background-color: #ef4444; }
.dot-yellow { background-color: #f59e0b; }
.dot-green { background-color: #10b981; }

.shell-title {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 700;
    margin-left: 8px;
    font-family: 'Courier New', Courier, monospace;
}

.shell-body {
    padding: 12px 15px;
    color: #38bdf8;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.88rem;
    line-height: 1.4;
    overflow-y: auto;
    flex-grow: 1;
}

.log-line {
    margin-bottom: 4px;
}

.log-line.system { color: #475569; }
.log-line.error { color: #f43f5e; font-weight: bold; }
.log-line.info { color: #f59e0b; }

.shell-prompt-line {
    color: #e2e8f0;
    margin-top: 8px;
}

.prompt-user { color: #10b981; font-weight: bold; }
.prompt-dir { color: #3b82f6; }

/* Typing simulator cursor */
#typedCmd::after {
    content: "█";
    color: #f59e0b;
    animation: blink 0.8s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Linux Admin Task Board (Right) */
.task-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 15px;
    text-align: left;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    height: 330px;
    box-sizing: border-box;
}

.task-card-header {
    margin-bottom: 8px;
}

.task-card-badge {
    background: #f59e0b;
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.task-card-body h3 {
    margin: 4px 0;
    color: #1e293b;
    font-size: 1.15rem;
    font-weight: 800;
}

.task-card-body p {
    margin: 0;
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.4;
}

.task-panel .question-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 8px 12px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.question-badge {
    background: #f59e0b;
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
}

.question-text {
    margin: 0;
    font-weight: 700;
    color: #334155;
    font-size: 0.85rem;
}

/* Choices Grid */
.task-panel .choices-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    flex-grow: 1;
}

.choice-btn {
    background: white;
    border: 2px solid #cbd5e1;
    color: #1e293b;
    font-size: 0.85rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Consolas', monospace;
}

.choice-btn:hover {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
    transform: translateY(-1px);
}

.choice-btn.correct {
    background: #ecfdf5 !important;
    border-color: #10b981 !important;
    color: #047857 !important;
}

.choice-btn.wrong {
    background: #fef2f2 !important;
    border-color: #ef4444 !important;
    color: #b91c1c !important;
    animation: bashShake 0.4s ease-in-out;
}

@keyframes bashShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

/* Modal Styling & Result Overrides */
.result-rank-box {
    color: #d97706;
    background: #fef3c7;
    border-color: #fde68a;
    font-size: 1.4rem;
    font-weight: 800;
    margin: 20px 0;
    padding: 15px;
    border-radius: 10px;
    border: 2px dashed #fde68a;
    text-align: center;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.show {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.glass-panel-modal {
    background: rgba(255, 255, 255, 0.96);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: slideUp 0.4s ease-out;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close-x {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 26px;
    font-weight: 700;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    padding: 5px;
    z-index: 10;
}

.modal-close-x:hover {
    color: #ef4444;
}

.modal-scroll-body {
    max-height: 220px;
    overflow-y: auto;
    padding-right: 8px;
    margin-bottom: 15px;
}

.modal-scroll-body::-webkit-scrollbar {
    width: 6px;
}

.modal-scroll-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.modal-scroll-body::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, 0.3);
    border-radius: 4px;
}

.modal-scroll-body::-webkit-scrollbar-thumb:hover {
    background: rgba(245, 158, 11, 0.5);
}

.btn-restart {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-restart:hover {
    background: #d97706;
}

.btn-share {
    background: #e2e8f0;
    color: #334155;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-share:hover {
    background: #cbd5e1;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 800px) {
    .bash-arena {
        grid-template-columns: 1fr;
    }
    .shell-panel, .task-panel {
        height: auto;
    }
}
