:root {
    --bg-base: #1A0A14;
    --bg-panel: rgba(38, 15, 28, 0.6);
    --bg-input: #2B0F1C;
    --bg-hover: rgba(253, 121, 168, 0.1);

    --border-light: rgba(253, 121, 168, 0.15);
    --border-highlight: rgba(253, 121, 168, 0.4);

    --text-main: #FFF0F5;
    --text-muted: #D1A3B4;

    --primary: #FD79A8;
    --primary-hover: #E84393;
    --secondary: #FFCCCC;
    --accent: #00CEC9;

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

    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(253, 121, 168, 0.15);

    --radius-lg: 12px;
    --radius-md: 8px;
    --radius-sm: 4px;
}

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg-base);
    background-image: radial-gradient(circle at 100% 0%, rgba(253, 121, 168, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 0% 100%, rgba(0, 206, 201, 0.05) 0%, transparent 40%);
    color: var(--text-main);
    line-height: 1.5;
    height: 100vh;
    overflow: hidden;
}

svg {
    display: block;
}

.w-4 {
    width: 1rem;
}

.h-4 {
    height: 1rem;
}

.w-5 {
    width: 1.25rem;
}

.h-5 {
    height: 1.25rem;
}

.w-6 {
    width: 1.5rem;
}

.h-6 {
    height: 1.5rem;
}

.w-12 {
    width: 3rem;
}

.h-12 {
    height: 3rem;
}

.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

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

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

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.w-full {
    width: 100%;
}

.ml-auto {
    margin-left: auto;
}

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

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

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

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

.text-xs {
    font-size: 0.75rem;
}

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

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

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

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

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--primary);
    color: #000;
    font-weight: 600;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-outline {
    background: rgba(0, 0, 0, 0.2);
    border-color: var(--border-light);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--bg-hover);
    border-color: var(--border-highlight);
}

.btn-success {
    background: rgba(0, 184, 148, 0.15);
    border-color: rgba(0, 184, 148, 0.3);
    color: var(--success);
}

.btn-success:hover {
    background: rgba(0, 184, 148, 0.25);
    border-color: var(--success);
}

.btn-icon {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 0.375rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    color: var(--text-main);
    background: var(--bg-hover);
}

/* Glass Panel */
.glass-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* App Layout */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem;
    gap: 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    flex-shrink: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: -2px;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

.workspace {
    display: flex;
    gap: 1.5rem;
    flex: 1;
    min-height: 0;
}

.editor-pane,
.results-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.pane-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
}

.pane-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

.editor-body {
    flex: 1;
    display: flex;
    position: relative;
}

.code-editor {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    padding: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    resize: none;
    line-height: 1.6;
}

.code-editor.slim {
    height: 100px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-input);
}

.pane-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    gap: 0.75rem;
}

/* Toggles */
.toggle-group {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    padding: 0.25rem;
}

.toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn.active {
    background: var(--border-light);
    color: var(--text-main);
}

/* Results */
.stats {
    display: flex;
    gap: 0.5rem;
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    font-family: 'JetBrains Mono', monospace;
}

.badge.pass {
    background: rgba(0, 184, 148, 0.15);
    color: var(--success);
}

.badge.fail {
    background: rgba(214, 48, 49, 0.15);
    color: var(--error);
}

.badge.warn {
    background: rgba(253, 203, 110, 0.15);
    color: var(--warning);
}

.badge.info {
    background: rgba(0, 206, 201, 0.15);
    color: var(--accent);
}

.results-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.result-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
}

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

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

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

.result-subject {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    font-weight: 500;
    word-break: break-all;
    margin-bottom: 0.5rem;
}

.result-status {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.issue-list {
    padding: 0;
    margin: 0;
    list-style: none;
    border-bottom: 1px solid var(--border-light);
}

.issue-item {
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.75rem;
    font-size: 0.8125rem;
    align-items: flex-start;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.issue-item:first-child {
    border-top: none;
}

.issue-item.error {
    color: var(--error);
}

.issue-item.warning {
    color: var(--warning);
}

.issue-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.autofix-panel {
    padding: 1rem;
    background: rgba(0, 206, 201, 0.05);
    border-top: 1px solid rgba(0, 206, 201, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.autofix-header {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.autofix-preview {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    white-space: pre-wrap;
}

/* Modals */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.modal-content {
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
}

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

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.checkbox-label input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.code-block-wrapper {
    position: relative;
    background: #000;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.code-block-wrapper pre {
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
    font-size: 0.8125rem;
    font-family: 'JetBrains Mono', monospace;
    color: #a9b7c6;
}

.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--primary);
    color: #000;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.875rem;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 100;
    pointer-events: none;
    box-shadow: var(--shadow-glow);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}