/* Premium Gamified Glassmorphic Radial Theme for Habit Tracker Wheel */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.15);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --bg-primary: #090c15;
    --bg-secondary: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #1e293b;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

.app {
    max-width: 100%;
    padding: 2.5rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Header styling */
.header {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.app-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #ffffff;
    text-shadow: 0 0 10px var(--primary-glow);
}

.stat {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--warning);
    text-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
}

/* Main Area: Split panel */
.main {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 2rem;
    align-items: start;
}

/* Left panel: Wheel & navigation */
.wheel-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--shadow);
}

.wheel-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin-bottom: 2rem;
}

#habitWheel {
    display: block;
    cursor: crosshair;
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 170px;
    height: 170px;
    background: #090c15;
    border-radius: 50%;
    border: 1px dashed var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.center-percentage {
    font-family: 'Outfit', sans-serif;
    font-size: 2.4rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255,255,255,0.15);
}

.center-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.date-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.date-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
    font-family: monospace;
}
.date-btn:hover {
    color: #ffffff;
}

.current-date {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
}

/* Right Panel: Habits listing */
.habits-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
}

.add-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.add-btn:hover {
    box-shadow: 0 0 12px var(--primary);
}

.habits-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.habit-item {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
}

.habit-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(99, 102, 241, 0.3);
}

.habit-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s;
}

.habit-checkbox.checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: 700;
}

.habit-info {
    flex: 1;
}

.habit-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
}

.habit-category {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
}

.habit-actions {
    display: flex;
    gap: 4px;
}

.habit-act-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 4px;
    transition: color 0.2s;
}

.habit-act-btn:hover {
    color: #ffffff;
}

/* Weekly grid overview at bottom */
.weekly-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.weekly-section h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

.weekly-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}

.day-column {
    text-align: center;
    background: rgba(0, 0, 0, 0.15);
    padding: 10px 4px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.day-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 8px;
}

.day-label.today {
    color: var(--primary);
}

.day-habits {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.day-habit-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}

/* Modal windows */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    max-width: 440px;
    width: 100%;
    box-shadow: var(--shadow);
}

.modal-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
}

.input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.9rem;
    margin-bottom: 16px;
    outline: none;
    font-family: inherit;
}

.input:focus {
    border-color: var(--primary);
}

/* Custom schedule selector (weekdays row) */
.weekday-picker {
    margin-bottom: 16px;
}

.weekday-picker label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.weekdays-row {
    display: flex;
    justify-content: space-between;
}

.day-checkbox-label {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.weekday-checkbox {
    display: none;
}

.weekday-checkbox:checked + .day-checkbox-label {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

/* Color selection stamps */
.color-picker {
    margin-bottom: 20px;
}

.color-picker label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.color-options {
    display: flex;
    justify-content: space-between;
}

.color-options input[type="radio"] {
    display: none;
}

.color-option {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.color-options input[type="radio"]:checked + .color-option {
    border-color: white;
    transform: scale(1.15);
    box-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-secondary,
.btn-primary {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
}

.btn-secondary {
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

/* Empty State visual card */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .main {
        grid-template-columns: 1fr;
    }
}