:root {
    /* Crimson Red Palette */
    --bg-main: #1A0A0A;
    --primary: #D63031;
    --primary-hover: #ff4757;
    --secondary: #FF7675;
    --accent: #00CEC9;
    --accent-hover: #17e2dd;

    --success: #2ed573;
    --error: #ff4757;
    --warning: #ffa502;

    --glass-bg: rgba(214, 48, 49, 0.05);
    /* Slight red tint */
    --glass-border: rgba(255, 118, 117, 0.15);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);

    --text-main: #ffffff;
    --text-muted: #a4b0be;

    --input-bg: rgba(0, 0, 0, 0.4);
    --input-border: rgba(214, 48, 49, 0.3);

    --radius: 12px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
    padding-bottom: 2rem;
}

/* Background Blobs */
.background-decor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    animation: float 20s infinite alternate ease-in-out;
}

.blob-1 {
    background: var(--primary);
    width: 500px;
    height: 500px;
    top: -150px;
    left: -100px;
}

.blob-2 {
    background: var(--accent);
    width: 400px;
    height: 400px;
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

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

    100% {
        transform: translate(-30px, 30px) scale(0.9);
    }
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

header p {
    color: var(--text-muted);
}

.main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

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

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

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

/* Glassmorphism */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    padding: 1.5rem;
}

/* Panels */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

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

.subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.hidden {
    display: none !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(214, 48, 49, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(214, 48, 49, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.w-full {
    width: 100%;
}

/* Color Inputs */
.color-inputs {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.color-input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.color-picker-wrapper {
    display: flex;
    gap: 1rem;
    align-items: center;
}

input[type="color"] {
    appearance: none;
    -webkit-appearance: none;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 8px;
    background: none;
    cursor: pointer;
    padding: 0;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: 2px solid var(--glass-border);
    border-radius: 8px;
}

input[type="text"] {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-main);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-family: 'Fira Code', monospace, sans-serif;
    font-size: 1rem;
    text-transform: uppercase;
    transition: var(--transition);
    outline: none;
}

input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(214, 48, 49, 0.25);
}

/* Ratio Display */
.ratio-display {
    text-align: center;
    padding: 1rem 0 2rem;
}

.ratio-value {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
    transition: color 0.3s;
}

.ratio-label {
    font-size: 1.5rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* WCAG Results */
.wcag-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wcag-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.wcag-group h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
}

.wcag-group h3 span {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.badges {
    display: flex;
    gap: 0.5rem;
}

.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.badge.pass {
    background: rgba(46, 213, 115, 0.15);
    color: var(--success);
    border: 1px solid rgba(46, 213, 115, 0.3);
}

.badge.fail {
    background: rgba(255, 71, 87, 0.15);
    color: var(--error);
    border: 1px solid rgba(255, 71, 87, 0.3);
}

/* Preview Box */
.preview-box {
    border-radius: 12px;
    overflow: hidden;
    transition: background-color 0.3s, color 0.3s;
    border: 1px solid var(--glass-border);
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.preview-large {
    font-size: 1.5rem;
    /* 24px */
    font-weight: 700;
    margin: 0;
}

.preview-normal {
    font-size: 1rem;
    /* 16px */
    line-height: 1.6;
}

.preview-ui-elements {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px dashed currentColor;
}

.preview-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: default;
    border: 2px solid currentColor;
    background: transparent;
    color: inherit;
    font-family: inherit;
    font-size: 0.9rem;
}

.preview-input {
    background: transparent;
    border: 1px solid currentColor;
    border-radius: 6px;
    padding: 0.75rem;
    color: inherit;
    font-family: inherit;
    flex: 1;
    min-width: 150px;
}

.preview-input::placeholder {
    color: inherit;
    opacity: 0.7;
}

.preview-icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

/* Batch Checking */
textarea {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-main);
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    resize: vertical;
    outline: none;
    transition: var(--transition);
}

textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(214, 48, 49, 0.25);
}

.batch-results {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.batch-results::-webkit-scrollbar {
    width: 6px;
}

.batch-results::-webkit-scrollbar-track {
    background: transparent;
}

.batch-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.batch-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

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

.batch-color {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
}

.color-dot {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.batch-ratio {
    font-weight: 700;
}

/* Suggestions */
.suggestions-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.suggestion-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: var(--transition);
    animation: fadeIn 0.4s ease;
}

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

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

.suggestion-card:hover {
    border-color: var(--primary);
}

.suggestion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.suggestion-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.suggestion-preview {
    padding: 1rem;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state p {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success);
    color: #1a1a1a;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(46, 213, 115, 0.3);
    z-index: 1000;
}

footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}