:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
}

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

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

.header h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1.25rem;
    color: var(--gray-600);
}

/* Sections */
section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

section h2 {
    margin-bottom: 1.5rem;
    color: var(--gray-900);
}

.hidden {
    display: none !important;
}

/* Input Section */
#content-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 200px;
}

#content-input:focus {
    outline: none;
    border-color: var(--primary);
}

.input-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.char-count {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Configuration Section */
.check-builder h3 {
    margin-bottom: 1rem;
    color: var(--gray-700);
}

.active-checks-list {
    background: var(--gray-50);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    min-height: 100px;
}

.check-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.check-item:last-child {
    margin-bottom: 0;
}

.check-text {
    flex: 1;
}

.check-remove {
    color: var(--danger);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.check-remove:hover {
    background: rgba(239, 68, 68, 0.1);
}

.add-check-form {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: 8px;
}

.add-check-form h4 {
    margin-bottom: 1rem;
    color: var(--gray-700);
}

.check-form-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.check-form-row label {
    color: var(--gray-600);
    font-weight: 500;
}

.check-form-row select,
.check-form-row input {
    padding: 0.5rem;
    border: 2px solid var(--gray-200);
    border-radius: 6px;
    font-size: 1rem;
}

.check-form-row input {
    flex: 1;
    min-width: 200px;
}

.config-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

/* Review Section */
.review-header {
    margin-bottom: 2rem;
}

.progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

.review-criteria {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-weight: 500;
    color: var(--gray-700);
}

.review-item {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    padding: 2rem;
    min-height: 150px;
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.review-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.review-nav {
    display: flex;
    justify-content: space-between;
}

/* Results Section */
.results-summary {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.result-stat {
    text-align: center;
    padding: 1.5rem;
    border-radius: 8px;
    background: var(--gray-50);
}

.result-stat.pass {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.result-stat.fail {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.result-stat.skip {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.failed-items {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.failed-items h3 {
    margin-bottom: 1rem;
    color: var(--gray-700);
}

.failed-item {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    border-left: 4px solid var(--danger);
}

.failed-item-check {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.failed-item-content {
    color: var(--gray-800);
}

.results-actions {
    display: flex;
    justify-content: space-between;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

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

.btn-secondary {
    background: var(--gray-600);
    color: white;
}

.btn-secondary:hover {
    background: var(--gray-700);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
}

.btn-ghost:hover {
    background: var(--gray-50);
}

.btn-pass {
    background: var(--success);
    color: white;
    position: relative;
}

.btn-pass:hover {
    background: #059669;
}

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

.btn-fail:hover {
    background: #dc2626;
}

.btn-skip {
    background: var(--warning);
    color: white;
}

.btn-skip:hover {
    background: #d97706;
}

.shortcut {
    font-size: 0.75rem;
    opacity: 0.8;
    padding: 0.125rem 0.375rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .review-actions {
        grid-template-columns: 1fr;
    }
    
    .results-summary {
        grid-template-columns: 1fr;
    }
    
    .check-form-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .check-form-row input {
        width: 100%;
    }
}