:root {
    --bg: #f4f7fb;
    --panel: #ffffff;
    --ink: #172033;
    --muted: #5d6a7c;
    --line: #d9e1ec;

    --brand: #2563eb;
    --brand-dark: #1d4ed8;

    --good: #198754;
    --warning: #d97706;
    --danger: #dc2626;

    --shadow: 0 12px 35px rgba(23, 32, 51, 0.12);
}

* {
    box-sizing: border-box;
}


/* ==========================================
   Main Page
   ========================================== */

.checker-shell {
    width: min(1000px, calc(100% - 32px));
    margin: 0 auto;
    padding: 50px 0;
}


/* ==========================================
   Introduction
   ========================================== */

.challenge-intro {
    max-width: 780px;
    margin: 0 auto 35px;
    text-align: center;
}

.eyebrow {
    color: var(--brand);
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.challenge-intro h1 {
    margin: 10px 0 18px;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
}

.challenge-intro>p {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.6;
}

.safety-warning {
    margin-top: 20px;
    padding: 14px 18px;

    border-radius: 10px;

    background-color: #fff7ed;
    border: 1px solid #fed7aa;

    color: #9a3412;

    font-weight: bold;
}


/* ==========================================
   Challenge Card
   ========================================== */

.challenge-card {
    padding: 30px;

    background: white;

    border: 1px solid var(--line);
    border-radius: 16px;

    box-shadow: var(--shadow);
}


/* ==========================================
   Password Cracker Character
   ========================================== */

.cracker-area {
    padding: 25px;
    margin-bottom: 30px;

    text-align: center;

    border-radius: 12px;

    background:
        linear-gradient(135deg,
            #eef4ff,
            #f8fafc);
}

.cracker-character {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.robot-image {
    width: 280px;
    max-width: 100%;
    height: auto;

    object-fit: contain;

    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}

.cracker-character.attacking {
    animation: attackShake 0.35s infinite;
}

@keyframes attackShake {

    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-3px);
    }

    100% {
        transform: translateX(0);
    }
}

.cracker-area h2 {
    margin: 5px 0 8px;
}

.cracker-area p {
    margin: 0;
    color: var(--muted);
}


/* ==========================================
   Password Form
   ========================================== */

.password-form {
    max-width: 700px;
    margin: 0 auto 30px;
}

.password-form label {
    display: block;

    margin-bottom: 8px;

    font-weight: bold;
}

.input-row {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr) auto;

    gap: 10px;
}

.password-form input {
    width: 100%;
    min-height: 52px;

    padding: 0 15px;

    border: 2px solid #cbd5e1;
    border-radius: 8px;

    font-size: 16px;
}

.password-form input:focus {
    outline: none;

    border-color: var(--brand);

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.15);
}


/* ==========================================
   Buttons
   ========================================== */

.actions {
    display: flex;

    gap: 10px;

    margin-top: 15px;
}

.actions button,
.secondary-button {
    min-height: 46px;

    padding: 0 18px;

    border-radius: 8px;

    border: none;

    cursor: pointer;

    font-weight: bold;
}

.attack-button {
    background: var(--brand);
    color: white;
}

.attack-button:hover {
    background: var(--brand-dark);
}

.secondary-button,
.ghost-button {
    background: #eef2f7;
    color: var(--ink);

    border: 1px solid var(--line);
}


/* ==========================================
   Result Panel
   ========================================== */

.result-panel {
    max-width: 700px;

    margin: 0 auto;

    padding: 25px;

    border: 1px solid var(--line);
    border-radius: 12px;

    background: #fbfdff;
}

.empty-state {
    text-align: center;

    color: var(--muted);
}

.empty-state h2 {
    color: var(--ink);
}

.result-header {
    text-align: center;

    margin-bottom: 18px;
}

.score-label {
    margin-bottom: 5px;

    color: var(--muted);

    font-size: 14px;

    text-transform: uppercase;

    font-weight: bold;
}

.strength-title {
    margin: 0;

    font-size: 32px;
}


/* ==========================================
   Strength Meter
   ========================================== */

.meter {
    height: 14px;

    margin-bottom: 25px;

    overflow: hidden;

    border-radius: 999px;

    background: #e2e8f0;
}

.meter-fill {
    width: 0;
    height: 100%;

    border-radius: inherit;

    transition: width 0.5s ease;
}

.risk-high .meter-fill,
.risk-high .status-dot {
    background: var(--danger);
}

.risk-medium .meter-fill,
.risk-medium .status-dot {
    background: var(--warning);
}

.risk-low .meter-fill,
.risk-low .status-dot {
    background: var(--good);
}


/* ==========================================
   Feedback
   ========================================== */

.feedback-section {
    margin-top: 20px;

    padding-top: 18px;

    border-top: 1px solid var(--line);
}

.feedback-section h3 {
    margin: 0 0 10px;
}

.feedback-section p,
.feedback-section li {
    color: var(--muted);

    line-height: 1.55;
}

.feedback-section ul {
    padding-left: 22px;
}

.breach-status {
    display: flex;

    align-items: flex-start;

    gap: 10px;
}

.status-dot {
    width: 12px;
    height: 12px;

    margin-top: 5px;

    flex-shrink: 0;

    border-radius: 50%;
}


/* ==========================================
   Challenge Message
   ========================================== */

.challenge-next {
    margin-top: 22px;

    padding: 18px;

    text-align: center;

    border-radius: 10px;

    background: #eef4ff;
}

.challenge-next h3 {
    margin-top: 0;
}

.challenge-next p {
    margin-bottom: 0;
}


/* ==========================================
   Learning Section
   ========================================== */

.learning-section {
    margin-top: 45px;

    text-align: center;
}

.learning-section>p {
    color: var(--muted);

    margin-bottom: 25px;
}

.education-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 16px;
}

.education-grid article {
    padding: 22px;

    background: white;

    border: 1px solid var(--line);
    border-radius: 12px;

    box-shadow:
        0 5px 15px rgba(23, 32, 51, 0.06);
}

.education-grid span {
    font-size: 35px;
}

.education-grid h3 {
    margin: 12px 0 8px;
}

.education-grid p {
    margin: 0;

    color: var(--muted);

    line-height: 1.5;
}


/* ==========================================
   Mobile
   ========================================== */

@media (max-width: 760px) {

    .checker-shell {
        width: min(100% - 20px, 1000px);
        padding: 30px 0;
    }

    .challenge-card {
        padding: 18px;
    }

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

    .actions {
        flex-direction: column;
    }

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