:root {
    --primary-color: #3498db;
    --primary-light: #5dade2;
    --primary-dark: #2980b9;
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --bg-color: #f9f9f9;
    --card-bg: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
}

/* Theme variations */
.blue-theme {
    --primary-color: #3498db;
    --primary-light: #5dade2;
    --primary-dark: #2980b9;
}

.teal-theme {
    --primary-color: #1abc9c;
    --primary-light: #48c9b0;
    --primary-dark: #16a085;
}

.purple-theme {
    --primary-color: #9b59b6;
    --primary-light: #af7ac5;
    --primary-dark: #8e44ad;
}

.green-theme {
    --primary-color: #27ae60;
    --primary-light: #2ecc71;
    --primary-dark: #219955;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    font-size: 24px;
    color: var(--primary-color);
}

.logo h1 {
    font-size: 20px;
    font-weight: 600;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s;
}

.icon-btn:hover {
    color: var(--primary-color);
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 10px;
}

.water-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

section {
    width: 100%;
    height: 300px;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

.water-progress {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: #e0f7fa;
    overflow: hidden;
}

.wave-container {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%;
}

.wave {
    position: absolute;
    bottom: 0;
    width: 200%;
    height: 100%;
    background: var(--primary-light);
    opacity: 0.8;
    animation: wave 8s linear infinite;
    transform: translateX(-25%);
    transition: height 0.5s ease;
}

@keyframes wave {
    0% {
        transform: translateX(-25%) translateY(0) rotate(0deg);
    }
    50% {
        transform: translateX(-25%) translateY(-10px) rotate(2deg);
    }
    100% {
        transform: translateX(-25%) translateY(0) rotate(0deg);
    }
}

.progress-info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1;
}

.progress-info span {
    display: block;
}

#current-amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-dark);
}

#goal-amount {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-light);
}

.divider {
    font-size: 18px;
    color: var(--text-light);
}

.unit {
    font-size: 14px;
    color: var(--text-light);
}

.percentage-circle {
    width: 100px;
}

.circular-chart {
    display: block;
    margin: 0 auto;
}

.circle-bg {
    fill: none;
    stroke: #eee;
    stroke-width: 2;
}

.circle-fill {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 2;
    stroke-linecap: round;
    animation: circle-fill-animation 1s ease-out forwards;
}

@keyframes circle-fill-animation {
    0% {
        stroke-dasharray: 0, 100;
    }
}

.percentage-text {
    fill: var(--primary-color);
    font-size: 0.5em;
    text-anchor: middle;
    font-weight: 600;
}

.intake-controls {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.intake-controls h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.quick-add-btns {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 10px;
}

.intake-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-light);
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.intake-btn:hover {
    background-color: var(--primary-color);
}

.custom-add {
    display: flex;
    gap: 10px;
}

.custom-add input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.custom-add button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.custom-add button:hover {
    background-color: var(--primary-dark);
}

.history-section, .stats-section {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-header h2 {
    font-size: 18px;
    color: var(--text-color);
}

.section-header button {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.history-list {
    min-height: 100px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-light);
}

.empty-state i {
    font-size: 30px;
    margin-bottom: 10px;
    color: #bdc3c7;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.history-item .amount {
    font-weight: 500;
    color: var(--primary-dark);
}

.history-item .time {
    font-size: 12px;
    color: var(--text-light);
}

.stats-cards {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.stat-card {
    flex: 1;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-light);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    font-size: 18px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: var(--text-color);
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

.modal-footer button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
    cursor: pointer;
}

.modal-footer button:hover {
    background-color: var(--primary-dark);
}

.time-period-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.period-btn {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: none;
    cursor: pointer;
    font-size: 12px;
}

.period-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.history-chart-container {
    height: 200px;
    margin-bottom: 20px;
}

.notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    text-align: center;
    z-index: 1000;
    animation: slideUp 0.3s;
}

.reset-section {
    margin-top: 15px;
    text-align: center;
}

.reset-btn {
    padding: 10px 20px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.reset-btn:hover {
    background-color: #c0392b;
}

.reset-btn:active {
    transform: scale(0.98);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.notification i {
    font-size: 20px;
}

.dismiss-btn {
    background: none;
    border: none;
    color: white;
    font-weight: 500;
    cursor: pointer;
    margin-left: 10px;
}

@media (max-width: 400px) {
    .water-display {
        flex-direction: column;
        gap: 20px;
    }
    
    .quick-add-btns {
        flex-direction: column;
    }
    
    .stats-cards {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
}


