:root {
    --saffron: #FF9933;
    --blue: #000080;
    --yellow: #fde047;
    --green: #22c55e;
    --white: #ffffff;
    --text: #ffffff;
    --glass: rgba(0, 0, 0, 0.5);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: url('bg.png') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    padding: 2rem 1rem;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.motto {
    text-align: center;
    color: #3b82f6;
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -2px;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--saffron), var(--blue), var(--yellow), var(--green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

header p {
    font-size: 1.1rem;
    color: #cbd5e1;
}

#tracker-container {
    background: var(--glass);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    overflow-x: auto;
}

.habit-header {
    display: grid;
    grid-template-columns: 280px repeat(8, 1fr);
    gap: 1rem;
    font-weight: 800;
    color: var(--yellow);
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.habit-row {
    display: grid;
    grid-template-columns: 280px repeat(8, 1fr);
    gap: 1rem;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.habit-name {
    font-weight: 500;
    color: #f1f5f9;
    font-size: 1.1rem;
}

.day-cell {
    text-align: center;
}

.status-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.status-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.1);
}

.status-btn.checked {
    background: linear-gradient(135deg, var(--green), #10b981);
    border-color: transparent;
    color: white;
}

.status-btn.checked::after {
    content: '✓';
    font-weight: 900;
}

/* Analysis Section */
.analysis-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--glass);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    margin-top: 1rem;
}

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

.circular-chart {
    display: block;
    width: 100%;
    height: 100%;
}

.circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 2.5;
}

.circle {
    fill: none;
    stroke-width: 2.8;
    stroke-linecap: round;
    stroke: url(#chartGradient);
}

.percentage {
    fill: #fff;
    font-size: 0.6em;
    text-anchor: middle;
    font-weight: 800;
}

.chart-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Reset Button Styling */
.reset-btn {
    margin-top: 1.5rem;
    padding: 0.8rem 2rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
}

.reset-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.2);
}

.reset-btn:active {
    transform: translateY(0);
}

/* Notes Section Styling */
.notes-section {
    background: var(--glass);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    margin-top: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.notes-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--yellow), var(--green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#notes-box {
    width: 100%;
    min-height: 200px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    color: #e2e8f0;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: all 0.3s ease;
}

#notes-box:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
}

#notes-box::placeholder {
    color: #64748b;
}

footer {
    margin-top: 3rem;
    text-align: center;
    color: #94a3b8;
    padding-bottom: 2rem;
}

.color-bars {
    display: flex;
    justify-content: center;
    height: 3px;
    width: 200px;
    margin: 0 auto 1rem;
    border-radius: 2px;
    overflow: hidden;
}

.bar { flex: 1; }
.saffron { background-color: var(--saffron); }
.blue { background-color: var(--blue); }
.yellow { background-color: var(--yellow); }
.green { background-color: var(--green); }

@media (max-width: 900px) {
    .habit-header, .habit-row {
        grid-template-columns: 150px repeat(8, 1fr);
    }
}
