:root {
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-color: #ffffff;
    --accent-color: #26d0ce;
    --dot-off: rgba(255, 255, 255, 0.2);
    --dot-lit: var(--accent-color);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    transition: background 0.5s ease;
    color: var(--text-color);
    overflow-x: hidden;
}

/* Themes */
body.theme-ocean {
    --bg-gradient: linear-gradient(135deg, #1a2980, #26d0ce);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-color: #ffffff;
    --accent-color: #26d0ce;
    --dot-off: rgba(255, 255, 255, 0.15);
    --dot-lit: #26d0ce;
    background: var(--bg-gradient);
}

body.theme-sunset {
    --bg-gradient: linear-gradient(135deg, #ff512f, #f09819);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-color: #ffffff;
    --accent-color: #ffecd2;
    --dot-off: rgba(255, 255, 255, 0.15);
    --dot-lit: #ffecd2;
    background: var(--bg-gradient);
}

body.theme-forest {
    --bg-gradient: linear-gradient(135deg, #134e5e, #71b280);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-color: #ffffff;
    --accent-color: #a8ff78;
    --dot-off: rgba(255, 255, 255, 0.15);
    --dot-lit: #a8ff78;
    background: var(--bg-gradient);
}

body.theme-midnight {
    --bg-gradient: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-color: #e0e0e0;
    --accent-color: #74ebd5;
    --dot-off: rgba(255, 255, 255, 0.1);
    --dot-lit: #74ebd5;
    background: var(--bg-gradient);
}

body.theme-rose {
    --bg-gradient: linear-gradient(135deg, #ff9a9e, #fecfef);
    --glass-bg: rgba(255, 255, 255, 0.3);
    --glass-border: rgba(255, 255, 255, 0.5);
    --text-color: #4a4a4a;
    --accent-color: #ff6b6b;
    --dot-off: rgba(74, 74, 74, 0.2);
    --dot-lit: #ff6b6b;
    background: var(--bg-gradient);
}

.app-container {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:active {
    transform: scale(0.98);
}

/* Theme Selector */
.theme-selector {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 15px;
}

.theme-btn {
    flex: 1;
    padding: 12px 5px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

.theme-btn.active {
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
}

body.theme-rose .theme-btn.active {
    color: #fff;
}

/* Time Section */
.time-section {
    text-align: center;
    padding: 30px 20px;
}

.digital-time {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.date-display {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* Binary Clock */
.binary-clock {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.binary-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.binary-header {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 10px;
    opacity: 0.8;
}

.binary-columns {
    display: flex;
    gap: 12px;
}

.binary-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--dot-off);
    transition: all 0.3s ease;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

.dot.lit {
    background-color: var(--dot-lit);
    box-shadow: 0 0 15px var(--dot-lit), 0 0 30px var(--dot-lit);
    transform: scale(1.1);
}

/* Name Day Section */
.name-day-section {
    text-align: center;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    opacity: 0.8;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.name-day-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent-color);
}

/* Weather Section */
.weather-section {
    padding: 25px 20px;
}

.current-weather {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.weather-icon {
    font-size: 64px;
}

.weather-temp {
    font-size: 36px;
    font-weight: 700;
}

.weather-desc {
    font-size: 18px;
    opacity: 0.9;
}

.forecast-container {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) transparent;
}

.forecast-container::-webkit-scrollbar {
    height: 6px;
}

.forecast-container::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    border-radius: 10px;
}

.forecast-day {
    min-width: 70px;
    text-align: center;
    padding: 15px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
}

.forecast-day-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    opacity: 0.8;
}

.forecast-day-icon {
    font-size: 28px;
    margin: 10px 0;
}

.forecast-day-temp {
    font-size: 16px;
    font-weight: 700;
}

.loading-text {
    font-size: 16px;
    opacity: 0.7;
    text-align: center;
    padding: 20px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.glass-card {
    animation: fadeIn 0.6s ease-out;
}
