:root {
    --bg: #f7f8fa;
    --card: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --nt: #10b981;
    --nt-bg: #d1fae5;
    --vt: #f59e0b;
    --vt-bg: #fef3c7;
    --border: rgba(17, 24, 39, 0.08);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --radius: 12px;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-family);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Header */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    max-width: 980px;
    margin: 0 auto;
    width: 100%;
}

.app-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.status-badge {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: var(--muted);
    color: white;
}

.status-badge.nt {
    background-color: var(--nt);
}

.status-badge.vt {
    background-color: var(--vt);
}

/* Cards */
.card {
    background-color: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    border: 1px solid var(--border);
}

.card-header {
    margin-bottom: 1rem;
}

.card-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

/* Hero Section */
.hero-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
    transition: border-color 0.3s ease;
}

.hero-card.nt-active {
    border-left: 6px solid var(--nt);
}

.hero-card.vt-active {
    border-left: 6px solid var(--vt);
}

.current-tariff-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.tariff-display {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.nt-text { color: var(--nt); }
.vt-text { color: var(--vt); }

.tariff-description {
    font-size: 1.125rem;
    color: var(--muted);
    margin-bottom: 2rem;
}

.countdown-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0.5rem;
}

.countdown-label {
    font-size: 0.875rem;
    color: var(--muted);
}

.countdown-timer {
    font-size: 2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.next-change-info {
    font-size: 0.875rem;
    color: var(--muted);
}

/* Timeline */
.timeline-visualization {
    height: 48px;
    background-color: #e5e7eb;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
    display: flex;
}

.timeline-segment {
    height: 100%;
    transition: opacity 0.2s;
}

.timeline-segment.nt { background-color: var(--nt); }
.timeline-segment.vt { background-color: var(--vt); }
.timeline-segment:hover { opacity: 0.9; cursor: help; }

.current-time-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--text);
    z-index: 10;
    pointer-events: none;
}

.current-time-marker::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    width: 10px;
    height: 10px;
    background-color: var(--text);
    border-radius: 50%;
}

.day-type-controls {
    display: flex;
    background-color: #f3f4f6;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 1rem;
}

.tab-btn {
    flex: 1;
    border: none;
    background: none;
    padding: 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    background-color: white;
    color: var(--text);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.schedule-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background-color: #f9fafb;
    border-radius: 8px;
    border-left: 4px solid transparent;
}

.schedule-item.nt { border-left-color: var(--nt); }
.schedule-item.vt { border-left-color: var(--vt); }
.schedule-item.current { background-color: white; border: 1px solid var(--accent); border-left: 4px solid var(--accent); }

/* Settings */
.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.setting-desc {
    font-size: 0.875rem;
    color: var(--muted);
}

/* Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

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

input:checked + .slider:before {
    transform: translateX(22px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.select-input {
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background-color: white;
    font-size: 0.875rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    width: 100%;
}

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

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

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

.btn-outline:hover {
    background-color: #eff6ff;
}

.app-footer {
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.75rem;
    color: var(--muted);
}

@media (min-width: 640px) {
    .container {
        padding: 2rem;
    }
    
    .btn {
        width: auto;
    }
}
