:root {
    --primary: #00CEC9;
    --primary-hover: #00b3b0;
    --secondary: #81ECEC;
    --accent: #E17055;
    --bg-base: #0A1A1A;
    --bg-card: rgba(16, 32, 32, 0.6);
    --text-main: #FFFFFF;
    --text-muted: #889999;
    --border: rgba(0, 206, 201, 0.2);

    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #d63031;

    --radius: 12px;
    --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 80% 20%, rgba(0, 206, 201, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(225, 112, 85, 0.05) 0%, transparent 40%);
}

.hidden {
    display: none !important;
}

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

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

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

.w-full {
    width: 100%;
}

.code-font {
    font-family: 'JetBrains Mono', monospace;
}

.text-sm {
    font-size: 0.85rem;
}

.app-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 0.5rem;
}

.shield-icon {
    width: 40px;
    height: 40px;
    color: var(--primary);
    filter: drop-shadow(0 0 8px rgba(0, 206, 201, 0.5));
}

.logo h1 {
    font-size: 2.2rem;
    font-weight: 700;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 2rem;
    overflow-x: auto;
}

.tab-btn {
    flex: 1;
    min-width: max-content;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

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

.tab-btn.active {
    color: var(--bg-base);
    background: var(--primary);
    box-shadow: 0 0 15px rgba(0, 206, 201, 0.3);
}

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cards & Layout */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.glass {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.card h2 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.desc {
    color: var(--text-muted);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.split-pane {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .split-pane {
        grid-template-columns: 1fr;
    }
}

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

/* Forms & Inputs */
textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    color: var(--secondary);
    resize: vertical;
    min-height: 120px;
    font-size: 0.9rem;
    line-height: 1.5;
    transition: var(--transition);
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 206, 201, 0.2);
}

.small-editor {
    min-height: 80px;
}

.editor-section {
    margin-bottom: 1rem;
}

.editor-section label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Badges */
.badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.danger {
    background: rgba(214, 48, 49, 0.2);
    color: var(--danger);
    border: 1px solid rgba(214, 48, 49, 0.3);
}

.badge.warning {
    background: rgba(253, 203, 110, 0.2);
    color: var(--warning);
    border: 1px solid rgba(253, 203, 110, 0.3);
}

/* Buttons */
button {
    border: none;
    border-radius: 8px;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.primary-btn {
    background: var(--primary);
    color: var(--bg-base);
}

.primary-btn:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 15px rgba(0, 206, 201, 0.4);
    transform: translateY(-1px);
}

.danger-btn {
    background: var(--accent);
    color: white;
}

.danger-btn:hover {
    background: #ff7e60;
    box-shadow: 0 0 15px rgba(225, 112, 85, 0.4);
    transform: translateY(-1px);
}

/* Displays */
.result-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
}

.result-box h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.token-display {
    word-break: break-all;
    background: rgba(0, 0, 0, 0.6);
    padding: 1rem;
    border-radius: 6px;
    color: var(--text-main);
    border-left: 3px solid var(--primary);
}

.warning-border {
    border-left-color: var(--warning);
}

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

/* Workflows */
.workflow-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step {
    position: relative;
    padding-left: 3rem;
}

.step-num {
    position: absolute;
    left: 0;
    top: -2px;
    width: 28px;
    height: 28px;
    background: rgba(0, 206, 201, 0.2);
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Practices List */
.best-practices-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.best-practices-list li {
    display: flex;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--success);
}

.best-practices-list .check {
    color: var(--success);
    font-size: 1.2rem;
    font-weight: bold;
}

.best-practices-list h4 {
    margin-bottom: 0.3rem;
    color: white;
}

.best-practices-list p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Quiz UI */
.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.option-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    text-align: left;
    padding: 1.2rem;
}

.option-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
}

.option-btn.correct {
    background: rgba(0, 184, 148, 0.2);
    border-color: var(--success);
}

.option-btn.incorrect {
    background: rgba(214, 48, 49, 0.2);
    border-color: var(--danger);
}

.feedback-box {
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
}

.feedback-box.correct {
    background: rgba(0, 184, 148, 0.1);
    border: 1px solid var(--success);
    color: #a8e6cf;
}

.feedback-box.incorrect {
    background: rgba(214, 48, 49, 0.1);
    border: 1px solid var(--danger);
    color: #ffb8b8;
}

.score-display {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 20px rgba(0, 206, 201, 0.4);
}