:root {
    --yi-red: #3dbced;
    --yi-red-dark: #9A1825;
    --cii-blue: #0054A6;
    --yi-black: #231F20;
    --yi-grey: #58595B;
    --bg-light: #F4F4F4;
    --card-bg: #FFFFFF;
}

* {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
    color: var(--yi-black);
    background-color: var(--bg-light);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Branding Header */
.brand-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background: white;
    border-bottom: 4px solid var(--yi-red);
    flex-wrap: wrap;
    gap: 20px;
}

.logo-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-header .header-logo {
    height: 52px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    display: block;
}

.brand-header .header-logo.cii-logo {
    height: 48px;
    max-width: 140px;
}

.brand-header .header-logo.masoom-logo {
    height: 48px;
    max-width: 160px;
}

.yi-logo-text {
    line-height: 1.1;
}

.yi-logo-main {
    color: var(--yi-red);
    font-size: 42px;
    font-weight: 900;
    font-family: "Arial Black", sans-serif;
}

.yi-logo-sub {
    color: var(--yi-black);
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    display: block;
}

.yi-logo-tagline {
    color: var(--yi-grey);
    font-size: 9px;
    letter-spacing: 0.5px;
    display: block;
}

.cii-logo-box {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cii-logo-main {
    color: var(--cii-blue);
    font-size: 32px;
    font-weight: 900;
    font-family: "Arial Black", sans-serif;
    line-height: 1;
}

.cii-logo-sub {
    color: var(--yi-grey);
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
}

.ne-spirit {
    color: var(--yi-red);
    font-weight: 900;
    font-size: 14px;
    border-left: 1.5px solid var(--yi-red);
    padding-left: 8px;
    line-height: 1.2;
}

.logo-fallback {
    display: none;
}

.brand-header .logo-wrap:not(.has-img) .logo-fallback {
    display: block;
}

.brand-header .logo-wrap.has-img .header-logo {
    display: block;
}

.brand-header .logo-wrap:not(.has-img) .header-logo {
    display: none;
}

header {
    text-align: center;
    padding: 40px 20px;
    background: var(--yi-red);
    color: white;
    margin-bottom: 20px;
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: 1px;
}

header .subtitle {
    font-size: 0.9rem;
    font-weight: 300;
    opacity: 0.9;
    margin-top: 5px;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 6px;
    background: #ddd;
    margin-bottom: 30px;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--yi-red);
    width: 10%;
    transition: width 0.4s ease;
}

/* Module Components */
.module-step {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.module-step.active {
    display: block;
}

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

.card {
    background: var(--card-bg);
    border-radius: 4px;
    padding: 35px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
    border-left: 6px solid var(--yi-red);
}

.highlight-box {
    background: #fff5f5;
    border: 1px dashed var(--yi-red);
    padding: 20px;
    border-radius: 4px;
    font-style: italic;
    margin: 25px 0;
    color: var(--yi-red-dark);
    text-align: center;
}

h2 {
    color: var(--yi-red);
    margin-top: 0;
    font-size: 1.5rem;
    text-transform: uppercase;
}

h3 {
    color: var(--cii-blue);
    font-size: 1.2rem;
}

ul {
    padding-left: 20px;
}

li {
    margin-bottom: 10px;
}

/* Buttons */
.btn {
    padding: 14px 35px;
    border-radius: 2px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: var(--yi-red);
    color: white;
}

.btn-primary:hover {
    background: var(--yi-black);
}

.btn-secondary {
    background: var(--yi-grey);
    color: white;
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* FAQ Style */
.faq-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.faq-q {
    font-weight: bold;
    color: var(--yi-red);
    display: block;
    margin-bottom: 5px;
}

.faq-a {
    color: var(--yi-black);
}

/* Leaderboard & Stats */
.leaderboard-card {
    background: white;
    margin-top: 50px;
    border: 1px solid #eee;
    overflow: hidden;
    border-radius: 4px;
}

.leaderboard-header {
    background: var(--cii-blue);
    color: white;
    padding: 15px 25px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.leaderboard-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 25px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 14px;
}

/* Certificate */
#certificate-container {
    display: none;
    text-align: center;
    margin-top: 40px;
}

canvas {
    max-width: 100%;
    height: auto;
    border: 1px solid #ccc;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

footer {
    background: white;
    border-top: 1px solid #eee;
    padding: 40px 20px;
    text-align: center;
    margin-top: 60px;
}

footer .footer-cii-logo {
    height: 70px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

footer .logo-wrap:not(.has-img) .footer-cii-logo {
    display: none;
}

footer .logo-wrap.has-img .logo-fallback {
    display: none;
}

footer .logo-wrap:not(.has-img) .logo-fallback {
    display: block;
}

.footer-tagline {
    font-size: 12px;
    color: var(--yi-grey);
    font-weight: 700;
    margin: 15px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

@media print {
    .no-print {
        display: none !important;
    }
}

/* Mobile header spacing (keep row layout) */
@media (max-width: 600px) {
    .brand-header {
        padding: 10px 12px;
        gap: 12px;
    }

    .logo-box,
    .cii-logo-box {
        flex: 1 1 0;
        justify-content: center;
    }

    .brand-header .header-logo {
        max-width: 70px;
        height: auto;
        padding-right: 10px;
    }

    .brand-header .header-logo.cii-logo,
    .brand-header .header-logo.masoom-logo {
        max-width: 130px;
    }
}


