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

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
    background: #f7f6f2;
    color: #1a1a1a;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 80px 24px;
    line-height: 1.5;
}

.container {
    width: 100%;
    max-width: 720px;
}

header {
    margin-bottom: 48px;
}

header .eyebrow {
    font-size: 15px;
    color: #6b6b6b;
    margin-bottom: 8px;
}

header h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 42px;
    font-weight: 400;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.subtitle {
    font-size: 16px;
    color: #6b6b6b;
}

.editor-section {
    margin-bottom: 48px;
}

textarea {
    width: 100%;
    min-height: 220px;
    padding: 20px;
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #1a1a1a;
    background: #ffffff;
    border: 1px solid #e0ddd5;
    border-radius: 12px;
    resize: vertical;
    outline: none;
    transition: border-color 0.15s ease;
}

textarea:focus {
    border-color: #1a1a1a;
}

textarea::placeholder {
    color: #a3a3a3;
}

.controls {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.mode-toggle {
    display: flex;
    background: #ffffff;
    border: 1px solid #e0ddd5;
    border-radius: 100px;
    padding: 3px;
}

.mode-btn {
    padding: 7px 18px;
    font-family: inherit;
    font-size: 14px;
    color: #6b6b6b;
    background: transparent;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.mode-btn.active {
    background: #1a1a1a;
    color: #ffffff;
}

.mode-btn:hover:not(.active) {
    color: #1a1a1a;
}

button#analyzeBtn {
    padding: 10px 24px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    background: #1a1a1a;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

button#analyzeBtn:hover:not(:disabled) {
    opacity: 0.85;
}

button#analyzeBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.results-section {
    margin-top: 8px;
}

.results-section h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 24px;
}

.finding {
    background: #ffffff;
    border: 1px solid #e0ddd5;
    border-radius: 14px;
    padding: 20px 22px;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.finding:hover {
    border-color: #c9c5ba;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.finding-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.severity-badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 100px;
}

.finding-high .severity-badge {
    background: #fbe4e4;
    color: #b3261e;
}

.finding-medium .severity-badge {
    background: #fdf0dc;
    color: #a05a00;
}

.finding-low .severity-badge {
    background: #eaeaea;
    color: #5a5a5a;
}

.rule-name {
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 13px;
    color: #6b6b6b;
}

.line-tag {
    margin-left: auto;
    font-size: 12px;
    color: #a3a3a3;
}

.finding-message {
    font-size: 14px;
    color: #3a3a3a;
    line-height: 1.5;
}

.no-issues {
    color: #6b6b6b;
    font-size: 14px;
}

.ai-block {
    background: #fdfcf9;
    border: 1px solid #e5e0d3;
    border-radius: 14px;
    padding: 24px 26px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ai-block:hover {
    border-color: #d4cdb8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ai-block-title {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    font-weight: 400;
    color: #1a1a1a;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee8d8;
}

.ai-block-text {
    font-size: 14px;
    line-height: 1.7;
    color: #3a3a3a;
}

.ai-suggestions-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-suggestions-list li {
    font-size: 14px;
    line-height: 1.6;
    color: #3a3a3a;
    padding-left: 22px;
    position: relative;
}

.ai-suggestions-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #b0a688;
    font-weight: 600;
}

.ai-disclaimer {
    margin-top: 20px;
    padding: 14px 18px;
    background: #f1efe8;
    border-radius: 10px;
    font-size: 13px;
    color: #7a7568;
    font-style: italic;
    line-height: 1.5;
}

.error {
    margin-top: 16px;
    padding: 12px 16px;
    background: #fbe4e4;
    color: #b3261e;
    border-radius: 8px;
    font-size: 14px;
}

.rate-limit-notice {
    margin-top: 16px;
    padding: 12px 16px;
    background: #fdf0dc;
    color: #a05a00;
    border-radius: 8px;
    font-size: 14px;
}

.hidden {
    display: none;
}
