:root {
    color-scheme: light dark;
    --bg-color: #f7f7fb;
    --text-color: #1a1a1a;
    --accent-color: #2563eb;
    --accent-hover: #1d4ed8;
    --border-color: #d1d5db;
    --error-color: #dc2626;
    --success-color: #16a34a;
    --warning-color: #ca8a04;
    --warning-hover: #a16207;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.container {
    width: min(900px, 100%);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 20px 40px -20px rgba(15, 23, 42, 0.3);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.page-header h1 {
    margin: 0;
    font-size: 2rem;
}

.page-header .tagline {
    margin: 0.25rem 0 0;
    color: #6b7280;
}

.identifier-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.identifier-section strong {
    font-size: 1.05rem;
}

.badge {
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background-color: var(--warning-color);
    color: #fff;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.textarea-section textarea {
    width: 100%;
    min-height: 260px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    resize: vertical;
    line-height: 1.4;
}

.textarea-section textarea.local-changes {
    border-color: var(--warning-color);
    box-shadow: 0 0 0 2px rgba(202, 138, 4, 0.25);
}

.controls {
    display: flex;
    gap: 1rem;
}

.controls button {
    flex: 1;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--accent-color);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.controls button:hover:enabled {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.controls button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.controls button.paused {
    background: var(--warning-color);
}

.controls button.paused:hover:enabled {
    background: var(--warning-hover);
}

.metadata {
    font-size: 0.9rem;
    color: #4b5563;
    display: grid;
    gap: 0.25rem;
}

.status {
    min-height: 1.4rem;
    font-size: 0.9rem;
}

.status.success {
    color: var(--success-color);
}

.status.error {
    color: var(--error-color);
}

.status.info {
    color: #2563eb;
}

.status.warning {
    color: var(--warning-color);
}

.notice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(202, 138, 4, 0.12);
    color: var(--warning-color);
    font-size: 0.9rem;
}

.notice-indicator {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 999px;
    background: var(--warning-color);
    box-shadow: 0 0 0 4px rgba(202, 138, 4, 0.15);
}

.page-footer {
    font-size: 0.85rem;
    color: #6b7280;
}

.visually-hidden {
    position: absolute;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (max-width: 640px) {
    body {
        padding: 1rem;
    }
    .container {
        padding: 1.5rem;
    }
    .controls {
        flex-direction: column;
    }
}
