:root {
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --accent: #6366f1;
    --accent-hover: #5558e3;
    --border: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --radius: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 28rem;
    margin: 0 auto;
    padding: 0.5rem;
}

h1 {
    text-align: center;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Status Card */
.status-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 0.875rem;
    box-shadow: var(--shadow);
    text-align: center;
    margin-bottom: 0.625rem;
}

.countdown-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 0.5rem;
}

.countdown-ring {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.ring-bg {
    stroke: var(--border);
}

.ring-progress {
    stroke: var(--accent);
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 1s linear;
}

.countdown-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.875rem;
    font-weight: 600;
}

.status-text {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin: 0;
}

/* Print Button */
.print-button {
    width: 100%;
    padding: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    font-family: inherit;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0.625rem;
}

.print-button:hover {
    background: var(--accent-hover);
}

.print-button:active {
    transform: scale(0.98);
}

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

/* Toggle */
.toggle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 0.625rem;
}

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

.toggle input {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 2.75rem;
    height: 1.5rem;
    background: #e5e7eb;
    border-radius: 1.5rem;
    transition: background 0.3s;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    background: white;
    border-radius: 50%;
    top: 0.125rem;
    left: 0.125rem;
    transition: transform 0.3s;
}

.toggle input:checked + .toggle-slider {
    background: var(--accent);
}

.toggle input:checked + .toggle-slider::after {
    transform: translateX(1.25rem);
}

.toggle-label {
    font-size: 0.75rem;
    color: var(--text-primary);
}

/* Settings */
.settings {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 0.625rem;
}

.settings summary {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.75rem;
    list-style: none;
}

.settings summary::-webkit-details-marker {
    display: none;
}

.settings[open] summary {
    border-bottom: 1px solid var(--border);
}

.settings-content {
    padding: 0.75rem;
}

.input-group {
    margin-bottom: 0.5rem;
}

.input-group label {
    display: block;
    font-size: 0.625rem;
    color: var(--text-secondary);
    margin-bottom: 0.125rem;
}

.input-group input {
    width: 100%;
    padding: 0.25rem 0.375rem;
    font-family: inherit;
    font-size: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--bg-primary);
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent);
}

.save-button {
    width: 100%;
    padding: 0.25rem;
    font-family: inherit;
    font-size: 0.75rem;
    background: var(--text-primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.save-button:hover {
    opacity: 0.9;
}

/* Log */
.log {
    font-size: 0.625rem;
    color: var(--text-secondary);
    text-align: center;
}

.log-entry {
    margin: 0.125rem 0;
    padding: 0.25rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    animation: fadeIn 0.3s;
}

.log-entry.error {
    color: #dc2626;
    background: #fee2e2;
}

.log-entry.success {
    color: #059669;
    background: #d1fae5;
}

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

