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

body {
    font-family: Arial, sans-serif;
    background: #020617;
    color: #e5e7eb;
}

#lockScreen {
    position: fixed;
    inset: 0;
    background: #020617;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lock-card {
    max-width: 430px;
    width: 100%;
    text-align: center;
    background: #0f172a;
    border: 1px solid #1e293b;
    padding: 35px;
    border-radius: 22px;
    box-shadow: 0 0 35px rgba(34, 197, 94, 0.25);
}

.lock-card h1 {
    color: #facc15;
    font-size: 30px;
    margin-bottom: 15px;
}

.lock-card p {
    color: #cbd5e1;
    margin-bottom: 15px;
}

#lockError {
    color: #ef4444;
    margin-top: 12px;
    font-weight: bold;
}

.top-header {
    background: linear-gradient(135deg, #020617, #0f172a, #14532d);
    padding: 25px 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1e293b;
}

.top-header h1 {
    color: #22c55e;
    font-size: 34px;
}

.top-header p {
    color: #cbd5e1;
    margin-top: 5px;
}

.header-box {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid #334155;
    padding: 18px 25px;
    border-radius: 18px;
    text-align: center;
}

.header-box h2 {
    color: #facc15;
}

.layout {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 25px;
    padding: 25px;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.main-content {
    min-width: 0;
}

.card,
.section {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 0 20px rgba(15, 23, 42, 0.8);
}

.card h2,
.section h3 {
    color: #22c55e;
    margin-bottom: 12px;
}

.card p,
.section p {
    line-height: 1.6;
    color: #d1d5db;
}

.progress {
    height: 14px;
    background: #1e293b;
    border-radius: 20px;
    overflow: hidden;
    margin: 15px 0;
}

#progressBar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #22c55e, #84cc16);
    border-radius: 20px;
    transition: 0.4s;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.tabs button {
    background: #0f172a;
    color: #cbd5e1;
    border: 1px solid #334155;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
}

.tabs button:hover,
.tabs button.active {
    background: #22c55e;
    color: #020617;
    border-color: #22c55e;
}

.tab-content {
    display: none;
}

.active-content {
    display: block;
}

#title {
    font-size: 34px;
    color: #facc15;
    margin-bottom: 20px;
}

.phase {
    display: inline-block;
    background: #14532d;
    color: #bbf7d0;
    padding: 8px 14px;
    border-radius: 30px;
    margin-bottom: 15px;
    font-weight: bold;
}

.section {
    margin-bottom: 22px;
}

input,
textarea,
select {
    width: 100%;
    background: #020617;
    color: white;
    border: 1px solid #334155;
    padding: 13px;
    border-radius: 12px;
    margin-top: 10px;
    outline: none;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

button,
.complete-btn {
    background: #22c55e;
    color: #020617;
    border: none;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 12px;
}

button:hover,
.complete-btn:hover {
    background: #86efac;
}

.complete-btn {
    width: 100%;
    font-size: 18px;
    padding: 16px;
}

.danger-btn {
    background: #ef4444;
    color: white;
    width: 100%;
}

.danger-btn:hover {
    background: #f87171;
}

.question-card {
    background: #020617;
    border: 1px solid #334155;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
}

.question-card h3 {
    color: #facc15;
    margin-bottom: 12px;
}

.option-btn {
    display: block;
    width: 100%;
    background: #1e293b;
    color: white;
    border: 1px solid #334155;
    padding: 13px;
    border-radius: 12px;
    margin-top: 10px;
    text-align: left;
}

.option-btn:hover {
    background: #2563eb;
    color: white;
}

.option-btn.correct {
    background: #16a34a;
}

.option-btn.wrong {
    background: #dc2626;
}

.command-card {
    background: #020617;
    border: 1px solid #334155;
    padding: 16px;
    border-radius: 14px;
    margin-bottom: 12px;
}

.command-title {
    color: #22c55e;
    font-family: monospace;
    font-size: 16px;
    font-weight: bold;
}

.command-text {
    color: #cbd5e1;
    margin-top: 8px;
}

.cert-card {
    background: #020617;
    border: 1px solid #334155;
    padding: 15px;
    border-radius: 14px;
    margin-bottom: 15px;
}

.cert-card h3 {
    color: #facc15;
    margin-bottom: 8px;
}

.cert-card a {
    color: #38bdf8;
    text-decoration: none;
    font-weight: bold;
}

.cert-card a:hover {
    text-decoration: underline;
}

.level-map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    gap: 10px;
}

.level-tile {
    background: #111827;
    border: 1px solid #334155;
    color: #94a3b8;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    font-weight: bold;
}

.level-tile.unlocked {
    background: #14532d;
    color: #bbf7d0;
    cursor: pointer;
}

.level-tile.current {
    background: #facc15;
    color: #020617;
}

.small-text {
    font-size: 14px;
    color: #94a3b8;
}

a {
    color: #38bdf8;
}

#savedProof {
    color: #22c55e;
    font-weight: bold;
    margin-top: 10px;
}

#resumeBox ul {
    margin-left: 22px;
    margin-top: 10px;
}

#resumeBox li {
    margin-bottom: 8px;
}

@media print {
    body {
        background: white;
        color: black;
    }

    .top-header,
    .sidebar,
    .tabs,
    button {
        display: none !important;
    }

    .layout {
        display: block;
        padding: 0;
    }

    .section,
    .card {
        background: white;
        color: black;
        border: 1px solid #ccc;
        box-shadow: none;
    }
}

@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
        padding: 15px;
    }

    .top-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
        padding: 22px;
    }

    .top-header h1 {
        font-size: 28px;
    }

    .header-box {
        width: 100%;
    }

    #title {
        font-size: 26px;
    }

    .tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
    }

    .tabs button {
        white-space: nowrap;
    }
}
