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

:root {
    --bg-primary: #0b1220;
    --bg-secondary: #111827;
    --bg-tertiary: #172033;
    --bg-card: rgba(17, 24, 39, 0.88);
    --bg-soft: rgba(255, 255, 255, 0.04);
    --bg-input: #1f2937;

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --accent-primary: #38bdf8;
    --accent-secondary: #8b5cf6;
    --accent-success: #22c55e;
    --accent-danger: #ef4444;
    --accent-warning: #f59e0b;

    --border-color: rgba(148, 163, 184, 0.16);

    --shadow-sm: 0 10px 24px rgba(0, 0, 0, 0.22);
    --shadow-md: 0 18px 50px rgba(0, 0, 0, 0.30);
    --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.42);

    --gradient-primary: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
    --gradient-soft: linear-gradient(135deg, rgba(56, 189, 248, 0.10), rgba(99, 102, 241, 0.08));
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);

    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.10), transparent 28%),
        radial-gradient(circle at top right, rgba(139, 92, 246, 0.08), transparent 25%),
        radial-gradient(circle at bottom center, rgba(14, 165, 233, 0.06), transparent 30%),
        linear-gradient(180deg, #08111f 0%, #0f172a 45%, #111827 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.page-shell {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(circle at center, black 45%, transparent 100%);
    opacity: 0.3;
}

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 28px 20px 40px;
    position: relative;
    z-index: 1;
}

.site-header {
    text-align: center;
    margin-bottom: 28px;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.04);
    color: var(--accent-primary);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: 16px;
}

.site-header h1 {
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #ffffff 0%, #d7e6ff 40%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tab-navigation {
    display: flex;
    gap: 10px;
    padding: 8px;
    margin: 0 auto 26px;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    backdrop-filter: blur(14px);
    position: sticky;
    top: 12px;
    z-index: 10;
}

.tab-button {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 14px 16px;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
    transition: 0.25s ease;
}

.tab-button:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}

.tab-button.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

main {
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 28px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(18px);
}

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

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

.hero-section {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(99, 102, 241, 0.08));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 34px;
    margin-bottom: 26px;
    position: relative;
    overflow: hidden;
}

.hero-copy {
    position: relative;
    z-index: 1;
}

.hero-pill,
.section-kicker,
.panel-tag,
.fake-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero-pill,
.section-kicker,
.fake-badge {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.05);
    color: var(--accent-primary);
}

.hero-copy h2,
.defense-header h2,
.simulation-hero h2 {
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.12;
    margin: 16px 0 14px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.hero-description,
.section-description,
.defense-intro {
    max-width: 820px;
    color: var(--text-secondary);
    font-size: 1.02rem;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 26px;
}

.cta-button,
.secondary-button,
.start-button,
.reset-button,
.submit-button,
.clear-log-button,
.slider-btn {
    border: none;
    border-radius: 14px;
    padding: 14px 20px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.25s ease;
}

.cta-button,
.start-button {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.cta-button:hover,
.start-button:hover,
.reset-button:hover,
.submit-button:hover,
.secondary-button:hover,
.clear-log-button:hover,
.slider-btn:hover {
    transform: translateY(-2px);
}

.secondary-button {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.stat-card,
.feature-card,
.info-card,
.side-card,
.tip-card,
.progress-container,
.step-display,
.status-display,
.category-section {
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: var(--radius-md);
    backdrop-filter: blur(14px);
}

.stat-card {
    padding: 18px;
}

.stat-number {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-label {
    display: block;
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.feature-grid,
.tips-grid {
    display: grid;
    gap: 18px;
}

.feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 24px;
}

.feature-card,
.info-card,
.tip-card {
    padding: 22px;
}

.feature-card:hover,
.info-card:hover,
.tip-card:hover,
.side-card:hover {
    border-color: rgba(110, 168, 254, 0.45);
    transform: translateY(-3px);
}

.feature-card,
.info-card,
.tip-card,
.side-card {
    transition: 0.25s ease;
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.feature-card h3,
.info-card h3,
.side-card h3,
.tip-card h4 {
    margin-bottom: 10px;
    font-size: 1.08rem;
}

.feature-card p,
.info-card p,
.tip-card p,
.side-card p {
    color: var(--text-secondary);
}

.warning-card {
    border-color: rgba(239, 68, 68, 0.28);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(255,255,255,0.03));
}

.slider-section {
    margin-top: 26px;
}

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

.slider-header h3 {
    font-size: 1.2rem;
}

.slider-controls {
    display: flex;
    gap: 10px;
}

.slider-btn {
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    font-size: 1.3rem;
}

.content-slider {
    position: relative;
    overflow: hidden;
}

.slider-track {
    position: relative;
}

.slide {
    display: none;
    animation: fadeIn 0.35s ease;
}

.slide.active {
    display: block;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.slider-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.22);
    cursor: pointer;
    transition: 0.25s ease;
}

.slider-dot.active {
    background: var(--accent-primary);
    transform: scale(1.15);
}

.simulation-hero {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.control-panel {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.reset-button {
    background: rgba(239, 68, 68, 0.14);
    color: #ffb8b8;
    border: 1px solid rgba(239, 68, 68, 0.28);
}

.simulation-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.9fr);
    gap: 18px;
}

.simulation-main,
.simulation-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.progress-container,
.step-display,
.status-display,
.side-card,
.category-section {
    padding: 22px;
}

.progress-header,
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.progress-title,
.panel-header h3 {
    font-weight: 700;
}

.progress-percentage {
    font-size: 1.1rem;
    color: var(--accent-primary);
    font-weight: 800;
}

.progress-bar {
    margin-top: 14px;
    height: 12px;
    background: var(--bg-input);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient-primary);
    border-radius: 999px;
    transition: width 0.35s ease;
}

.panel-tag {
    padding: 7px 10px;
    background: rgba(34, 197, 94, 0.12);
    color: #9bf5b7;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.panel-tag.danger {
    background: rgba(239, 68, 68, 0.12);
    color: #ffb4b4;
    border-color: rgba(239, 68, 68, 0.22);
}

.step-content {
    min-height: 88px;
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 1.06rem;
}

.step-animation {
    display: flex;
    align-items: center;
    gap: 12px;
}

.step-icon {
    font-size: 1.4rem;
}

.credential-form {
    margin-top: 18px;
}

.form-container {
    border-radius: 20px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.88), rgba(185, 28, 28, 0.92));
    box-shadow: var(--shadow-md);
}

.form-container h3 {
    margin: 12px 0 10px;
    font-size: 1.6rem;
}

.form-instruction {
    color: rgba(255,255,255,0.9);
    margin-bottom: 18px;
}

.login-form {
    display: grid;
    gap: 14px;
    max-width: 460px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-group label {
    font-size: 0.88rem;
    font-weight: 700;
}

.form-group input {
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.12);
    color: white;
    padding: 14px 15px;
    border-radius: 12px;
    outline: none;
    font-size: 1rem;
}

.form-group input::placeholder {
    color: rgba(255,255,255,0.72);
}

.form-group input:focus {
    border-color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.16);
}

.submit-button {
    margin-top: 8px;
    background: rgba(255,255,255,0.16);
    color: white;
    border: 1px solid rgba(255,255,255,0.24);
}

.warning-message {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    font-size: 0.92rem;
}

.status-message {
    color: #ffb4b4;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.18);
    border-radius: 14px;
    padding: 16px;
    font-size: 1.08rem;
    font-weight: 700;
}

.side-list {
    margin-top: 12px;
    padding-left: 18px;
    color: var(--text-secondary);
}

.side-list li + li {
    margin-top: 8px;
}

.clear-log-button {
    margin: 14px 0 12px;
    width: 100%;
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.log-content {
    height: 340px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px;
    font-family: "JetBrains Mono", "Fira Code", monospace;
    font-size: 0.82rem;
}

.log-entry {
    padding: 8px 10px;
    border-radius: 10px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.03);
}

.log-time {
    color: var(--accent-primary);
    font-weight: 700;
}

.log-step {
    color: var(--text-secondary);
}

.log-mitre {
    color: #fca5a5;
    font-weight: 700;
}

.defense-header {
    text-align: center;
    margin-bottom: 24px;
}

.tips-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.implementation-steps {
    margin-top: 16px;
    padding: 16px;
    border-radius: 14px;
    background: var(--bg-soft);
    border: 1px solid var(--border-color);
}

.implementation-steps h5 {
    margin-bottom: 10px;
    color: var(--accent-primary);
    font-size: 0.95rem;
}

.implementation-steps ul {
    list-style: none;
}

.implementation-steps li {
    position: relative;
    padding-left: 18px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.implementation-steps li + li {
    margin-top: 8px;
}

.implementation-steps li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-success);
    font-weight: 800;
}

footer {
    margin-top: 24px;
    text-align: center;
}

.mitre-note {
    display: inline-block;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid rgba(239, 68, 68, 0.22);
    background: rgba(239, 68, 68, 0.08);
    color: #ffb7b7;
    max-width: 900px;
    font-size: 0.92rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
}

.footer-links a:hover {
    color: var(--text-primary);
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.04);
}

::-webkit-scrollbar-thumb {
    background: rgba(110, 168, 254, 0.55);
    border-radius: 999px;
}

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

@media (max-width: 1100px) {
    .feature-grid,
    .tips-grid,
    .hero-stats,
    .simulation-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {
    .container {
        padding: 16px 12px 30px;
    }

    main {
        padding: 18px;
        border-radius: 22px;
    }

    .tab-navigation {
        top: 8px;
    }

    .tab-button {
        padding: 12px 10px;
        font-size: 0.92rem;
    }

    .tab-label {
        display: none;
    }

    .hero-section,
    .feature-card,
    .info-card,
    .tip-card,
    .progress-container,
    .step-display,
    .status-display,
    .side-card,
    .category-section {
        padding: 18px;
    }

    .hero-actions,
    .control-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-button,
    .secondary-button,
    .start-button,
    .reset-button {
        width: 100%;
    }

    .log-content {
        height: 260px;
    }

    .form-container h3 {
        font-size: 1.3rem;
    }
}