/* Custom styles for cryptx-theme - HTB-like Dark Theme */

/* ========== CSS VARIABLES ========== */
:root {
    --htb-dark: #13120a;
    --htb-dark-secondary: #13120a;
    --htb-green: var(--theme-color, #9fef00);
    --htb-green-dark: var(--theme-color, #7bc600);
    --htb-text: #a4b1cd;
    --htb-text-muted: #6b7280;
    --htb-border: #30363d;
    --htb-success: #10b981;
    --htb-error: #ef4444;
    --htb-warning: #f59e0b;
}

/* ========== RESET & BASE ========== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    position: relative;
    min-height: 100%;
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Exo 2', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--htb-dark);
    color: var(--htb-text);
    line-height: 1.6;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--htb-dark);
}

::-webkit-scrollbar-thumb {
    background: #1e2633;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--htb-green);
}

/* Selection Color */
::selection {
    background: var(--htb-green);
    color: var(--htb-dark);
}

/* ========== TYPOGRAPHY ========== */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: #fff;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

a {
    color: var(--htb-green);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--htb-green-dark);
}

/* ========== LAYOUT ========== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* ========== NAVIGATION ========== */
nav {
    background-color: var(--htb-dark-secondary);
    border-bottom: 1px solid var(--htb-border);
    padding: 0 1rem;
}

nav a {
    color: var(--htb-text);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s, background-color 0.2s;
}

nav a:hover {
    color: var(--htb-green);
    background-color: rgba(159, 239, 0, 0.1);
}

/* ========== CARDS ========== */
.card {
    background-color: var(--htb-dark-secondary);
    border: 1px solid var(--htb-border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
    border-color: var(--htb-green);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--htb-green);
    color: var(--htb-dark);
}

.btn-primary:hover {
    background-color: var(--htb-green-dark);
    color: var(--htb-dark);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--htb-border);
    color: var(--htb-text);
}

.btn-secondary:hover {
    border-color: var(--htb-green);
    color: var(--htb-green);
}

/* ========== FORMS ========== */
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #fff;
    background-color: var(--htb-dark);
    border: 1px solid var(--htb-border);
    border-radius: 0.375rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--htb-green);
    box-shadow: 0 0 0 3px rgba(159, 239, 0, 0.1);
}

.form-control::placeholder,
input::placeholder {
    color: var(--htb-text-muted);
}

label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--htb-green);
}

/* ========== TABLES ========== */
.table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--htb-dark-secondary);
    border-radius: 0.5rem;
    overflow: hidden;
}

.table th {
    background-color: rgba(107, 114, 128, 0.2);
    color: var(--htb-green);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--htb-border);
}

.table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--htb-border);
    color: var(--htb-text);
}

.table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ========== CHALLENGES GRID ========== */
.challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.challenge-card {
    background-color: var(--htb-dark-secondary);
    border: 1px solid var(--htb-border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.challenge-card:hover {
    border-color: var(--htb-green);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.challenge-card.solved {
    border-color: var(--htb-green);
    background-color: rgba(159, 239, 0, 0.05);
}

.challenge-card .challenge-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.challenge-card:hover .challenge-name {
    color: var(--htb-green);
}

.challenge-card .challenge-value {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    color: var(--htb-text-muted);
}

.challenge-card .solved-icon {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    color: var(--htb-green);
}

/* Category section */
.category-section {
    margin-bottom: 3rem;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--htb-green);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--htb-border);
}

/* ========== MODALS ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background-color: var(--htb-dark-secondary);
    border: 1px solid var(--htb-border);
    border-radius: 0.5rem;
    max-width: 42rem;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem;
    border-bottom: 1px solid var(--htb-border);
}

.modal-body {
    padding: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--htb-text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.25rem;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #fff;
}

/* ========== PAGE HEADER / JUMBOTRON ========== */
.page-header {
    text-align: center;
    padding: 3rem 0;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
}

@media (min-width: 768px) {
    .page-header h1 {
        font-size: 3.75rem;
    }
}

/* ========== ALERTS ========== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--htb-success);
    color: var(--htb-success);
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--htb-error);
    color: var(--htb-error);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--htb-warning);
    color: var(--htb-warning);
}

/* ========== BADGES ========== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

.badge-primary {
    background-color: rgba(159, 239, 0, 0.15);
    color: var(--htb-green);
}

.badge-secondary {
    background-color: rgba(107, 114, 128, 0.2);
    color: var(--htb-text-muted);
}

/* ========== LOADING SPINNER ========== */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ========== FOOTER ========== */
footer {
    background-color: var(--htb-dark-secondary);
    border-top: 1px solid var(--htb-border);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--htb-text-muted);
    font-size: 0.875rem;
}

/* ========== PROSE / MARKDOWN CONTENT ========== */
.prose {
    color: var(--htb-text);
    line-height: 1.7;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
    color: #fff;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.prose p {
    margin-bottom: 1rem;
}

.prose code {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

.prose pre {
    background-color: var(--htb-dark);
    border: 1px solid var(--htb-border);
    border-radius: 0.375rem;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.prose pre code {
    background: none;
    padding: 0;
}

.prose a {
    color: var(--htb-green);
}

.prose a:hover {
    text-decoration: underline;
}

.prose ul,
.prose ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .challenges-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .challenge-card {
        min-height: 140px;
        padding: 1rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .table th,
    .table td {
        padding: 0.75rem 1rem;
    }
}

/* ========== UTILITY CLASSES ========== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.text-white {
    color: #fff;
}

.text-green {
    color: var(--htb-green);
}

.text-muted {
    color: var(--htb-text-muted);
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.font-mono {
    font-family: 'Courier New', monospace;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.grid {
    display: grid;
}

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

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

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

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

.hidden {
    display: none;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.inline-flex {
    display: inline-flex;
}

.w-full {
    width: 100%;
}

.max-w-md {
    max-width: 28rem;
}

.max-w-lg {
    max-width: 32rem;
}

.max-w-xl {
    max-width: 36rem;
}

.max-w-2xl {
    max-width: 42rem;
}

.max-w-4xl {
    max-width: 56rem;
}

.max-w-7xl {
    max-width: 80rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.min-h-screen {
    min-height: 100vh;
}

.overflow-hidden {
    overflow: hidden;
}

.overflow-x-auto {
    overflow-x: auto;
}

.rounded {
    border-radius: 0.25rem;
}

.rounded-md {
    border-radius: 0.375rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.border {
    border-width: 1px;
}

.border-gray-700 {
    border-color: var(--htb-border);
}

.border-gray-800 {
    border-color: #1f2937;
}

.bg-htb-dark {
    background-color: var(--htb-dark);
}

.bg-htb-dark-secondary {
    background-color: var(--htb-dark-secondary);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.transition-all {
    transition: all 0.2s ease;
}

.transition-colors {
    transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.z-50 {
    z-index: 50;
}

.z-100 {
    z-index: 100;
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.375rem;
    background-color: var(--htb-dark-secondary);
    border: 1px solid var(--htb-border);
    color: var(--htb-text);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.pagination a:hover {
    border-color: var(--htb-green);
    color: var(--htb-green);
    background-color: rgba(159, 239, 0, 0.05);
}

/* ========== RANK MEDALS ========== */
.rank-medal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 700;
}

.rank-gold {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #1a1a1a;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}

.rank-silver {
    background: linear-gradient(135deg, #e0e0e0, #b0b0b0);
    color: #1a1a1a;
    box-shadow: 0 0 12px rgba(192, 192, 192, 0.3);
}

.rank-bronze {
    background: linear-gradient(135deg, #cd7f32, #a0522d);
    color: #fff;
    box-shadow: 0 0 12px rgba(205, 127, 50, 0.3);
}

.rank-row-1 {
    background-color: rgba(255, 215, 0, 0.04) !important;
}

.rank-row-current {
    border-left: 3px solid var(--htb-green) !important;
    background-color: rgba(159, 239, 0, 0.04) !important;
}

/* ========== GLOW ANIMATIONS ========== */
@keyframes glow-pulse {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(159, 239, 0, 0.2);
    }

    50% {
        box-shadow: 0 0 20px rgba(159, 239, 0, 0.4), 0 0 40px rgba(159, 239, 0, 0.1);
    }
}

@keyframes neon-border {

    0%,
    100% {
        border-color: rgba(159, 239, 0, 0.3);
    }

    50% {
        border-color: rgba(159, 239, 0, 0.7);
    }
}

@keyframes grid-scroll {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

.glow-pulse {
    animation: glow-pulse 2s ease-in-out infinite;
}

.neon-border {
    animation: neon-border 2s ease-in-out infinite;
}

/* ========== AUTH PAGE BACKGROUND ========== */
.auth-bg {
    position: relative;
    overflow: hidden;
}

.auth-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(159, 239, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(159, 239, 0, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: grid-scroll 8s linear infinite;
    z-index: 0;
}

.auth-bg>* {
    position: relative;
    z-index: 1;
}

/* Auth Card Glow */
.auth-card {
    background-color: var(--htb-dark-secondary);
    border: 1px solid var(--htb-border);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.auth-card:hover {
    border-color: rgba(159, 239, 0, 0.3);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(159, 239, 0, 0.05);
}

/* ========== STATS CARDS ========== */
.stat-card {
    background-color: var(--htb-dark-secondary);
    border: 1px solid var(--htb-border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    transition: border-color 0.2s, transform 0.2s;
}

.stat-card:hover {
    border-color: var(--htb-green);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--htb-green);
    font-family: 'Courier New', monospace;
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--htb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
}

/* ========== TABS ========== */
.tab-nav {
    display: flex;
    border-bottom: 1px solid var(--htb-border);
    margin-bottom: 1.5rem;
    gap: 0;
}

.tab-nav button {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--htb-text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.tab-nav button:hover {
    color: var(--htb-text);
}

.tab-nav button.active {
    color: var(--htb-green);
    border-bottom-color: var(--htb-green);
}

/* ========== HINTS ========== */
.hint-item {
    background-color: var(--htb-dark);
    border: 1px solid var(--htb-border);
    border-radius: 0.375rem;
    overflow: hidden;
}

.hint-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.75rem 1rem;
    color: var(--htb-text);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s;
}

.hint-toggle:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.hint-cost {
    font-size: 0.75rem;
    color: var(--htb-warning);
    font-weight: 600;
}

.hint-content {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--htb-border);
    color: var(--htb-text);
    font-size: 0.875rem;
}

/* ========== CHALLENGES GRID & CARDS ========== */
.category-section {
    margin-bottom: 2.5rem;
}

.category-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--htb-green);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--htb-border);
}

.challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.challenge-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    background-color: var(--htb-dark-secondary);
    border: 1px solid var(--htb-border);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    min-height: 140px;
}

.challenge-card:hover {
    border-color: var(--htb-green);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 15px rgba(159, 239, 0, 0.07);
}

.challenge-card.solved {
    border-color: var(--htb-success);
    background: linear-gradient(135deg, var(--htb-dark-secondary), rgba(16, 185, 129, 0.05));
}

.challenge-name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.25rem 0;
    word-break: break-word;
}

.challenge-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--htb-green);
    font-family: 'Courier New', monospace;
}

.solved-icon {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    color: var(--htb-success);
    font-size: 1.1rem;
}

/* ========== BADGES ========== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.4;
}

.badge-primary {
    background-color: rgba(159, 239, 0, 0.15);
    color: var(--htb-green);
    border: 1px solid rgba(159, 239, 0, 0.3);
}

.badge-secondary {
    background-color: rgba(164, 177, 205, 0.1);
    color: var(--htb-text-muted);
    border: 1px solid var(--htb-border);
}

/* ========== MODAL ========== */
.modal-content {
    background-color: var(--htb-dark-secondary);
    border: 1px solid var(--htb-border);
    border-radius: 0.75rem;
    width: 100%;
    max-width: 40rem;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--htb-border);
}

.modal-body {
    padding: 1.5rem;
}

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    background: none;
    border: 1px solid var(--htb-border);
    color: var(--htb-text-muted);
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.modal-close:hover {
    color: #fff;
    border-color: var(--htb-text-muted);
    background-color: rgba(255, 255, 255, 0.05);
}

/* ========== ALERTS ========== */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    border: 1px solid;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--htb-success);
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--htb-error);
}

/* ========== PROSE (Markdown Content) ========== */
.prose {
    color: var(--htb-text);
    font-size: 0.9375rem;
    line-height: 1.7;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
    color: #fff;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.prose p {
    margin-bottom: 1em;
}

.prose a {
    color: var(--htb-green);
    text-decoration: underline;
}

.prose code {
    background-color: rgba(255, 255, 255, 0.06);
    padding: 0.15em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.85em;
    color: #e0e0e0;
}

.prose pre {
    background-color: var(--htb-dark);
    border: 1px solid var(--htb-border);
    border-radius: 0.375rem;
    padding: 1rem;
    overflow-x: auto;
    margin: 1em 0;
}

.prose pre code {
    background: none;
    padding: 0;
    font-size: 0.85rem;
}

.prose ul,
.prose ol {
    padding-left: 1.5em;
    margin-bottom: 1em;
}

.prose li {
    margin-bottom: 0.25em;
}

.prose img {
    max-width: 100%;
    border-radius: 0.375rem;
}

.prose blockquote {
    border-left: 3px solid var(--htb-green);
    padding-left: 1rem;
    margin: 1em 0;
    color: var(--htb-text-muted);
    font-style: italic;
}

/* ========== SPINNER ========== */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}