:root {
    --primary: #03045E;
    --secondary: #023E8A;
    --accent: #0077B6;
    --light-blue: #0096C7;
    --very-light-blue: #90E0EF;
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
    --gray: #6C757D;
    --success: #28A745;
    --warning: #FFC107;
    --danger: #DC3545;
    --shadow: rgba(3, 4, 94, 0.1);
    --paper-texture: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23f8f9fa' fill-opacity='0.03'%3E%3Cpath d='M20 20c0 6.627-5.373 12-12 12s-12-5.373-12-12 5.373-12 12-12 12 5.373 12 12zm-14-.5c0 4.418 3.582 8 8 8s8-3.582 8-8-3.582-8-8-8-8 3.582-8 8z'/%3E%3C/g%3E%3C/svg%3E");
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--very-light-blue) 0%, var(--light-blue) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--primary);
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--paper-texture);
    pointer-events: none;
    z-index: -1;
}

.app-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 1rem;
    box-shadow: 0 4px 20px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header h1 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    color: var(--white);
    padding: 0.75rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

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

.app-main {
    padding: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.section {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.section.active {
    display: block;
}

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

.user-avatar {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.body-container {
    position: relative;
    width: 120px;
    height: 200px;
    background: var(--white);
    border-radius: 60px 60px 40px 40px;
    box-shadow: 0 8px 30px var(--shadow);
    overflow: hidden;
}

.water-level {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(0deg, var(--accent) 0%, var(--light-blue) 50%, var(--very-light-blue) 100%);
    transition: height 1s ease-in-out;
    border-radius: 0 0 40px 40px;
}

.water-level::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20'%3E%3Cpath d='M0,10 Q25,0 50,10 T100,10 V20 H0 Z' fill='%230096C7'/%3E%3C/svg%3E");
    animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-10px); }
}

.body-outline {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: var(--gray);
    opacity: 0.3;
}

.progress-card {
    background: var(--white);
    border-radius: 20px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 8px 30px var(--shadow);
    border: 1px solid rgba(144, 224, 239, 0.3);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.progress-header h2 {
    color: var(--primary);
    font-size: 1.3rem;
}

.date {
    color: var(--gray);
    font-size: 0.9rem;
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, var(--very-light-blue) 0%, rgba(144, 224, 239, 0.3) 100%);
    border-radius: 15px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.stat-unit {
    font-size: 0.8rem;
    color: var(--accent);
    margin-left: 0.2rem;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 0.5rem;
}

.progress-bar {
    position: relative;
    height: 20px;
    background: rgba(144, 224, 239, 0.3);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--light-blue) 100%);
    border-radius: 10px;
    transition: width 1s ease-in-out;
    position: relative;
}

.progress-waves {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20'%3E%3Cpath d='M0,10 Q25,5 50,10 T100,10 V20 H0 Z' fill='rgba(255,255,255,0.3)'/%3E%3C/svg%3E");
    animation: progressWave 3s ease-in-out infinite;
}

@keyframes progressWave {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-20px); }
}

.progress-percentage {
    text-align: center;
    font-weight: bold;
    color: var(--primary);
    font-size: 1.1rem;
}

.intake-controls {
    background: var(--white);
    border-radius: 20px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 8px 30px var(--shadow);
}

.intake-controls h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.container-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.container-btn {
    background: linear-gradient(135deg, var(--very-light-blue) 0%, rgba(144, 224, 239, 0.5) 100%);
    border: 2px solid transparent;
    border-radius: 15px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.container-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--shadow);
    border-color: var(--accent);
}

.container-btn:active {
    transform: scale(0.95);
}

.container-btn i {
    font-size: 1.5rem;
    color: var(--accent);
}

.container-btn span {
    font-weight: bold;
    color: var(--primary);
}

.container-btn small {
    color: var(--gray);
    font-size: 0.8rem;
}

.custom-amount {
    border-top: 1px solid rgba(144, 224, 239, 0.5);
    padding-top: 1rem;
}

.custom-amount label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary);
    font-weight: 500;
}

.input-group {
    display: flex;
    gap: 0.5rem;
}

.input-group input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid rgba(144, 224, 239, 0.5);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--white);
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent);
}

.input-group button {
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.input-group button:hover {
    background: var(--primary);
    transform: scale(1.05);
}

.activity-card {
    background: var(--white);
    border-radius: 20px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 8px 30px var(--shadow);
}

.activity-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.activity-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-controls select,
.temperature-input input {
    padding: 0.75rem;
    border: 2px solid rgba(144, 224, 239, 0.5);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--white);
}

.temperature-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.temperature-input label {
    color: var(--primary);
    font-weight: 500;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.history-header h2 {
    color: var(--primary);
    font-size: 1.5rem;
}

.period-selector {
    display: flex;
    gap: 0.5rem;
}

.period-btn {
    background: rgba(144, 224, 239, 0.3);
    border: 2px solid transparent;
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: 15px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 15px var(--shadow);
}

.stat-icon {
    font-size: 2rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary);
}

.stat-text {
    font-size: 0.8rem;
    color: var(--gray);
}

.chart-container {
    background: var(--white);
    border-radius: 15px;
    padding: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px var(--shadow);
    overflow-x: auto;
}

.history-list {
    background: var(--white);
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 4px 15px var(--shadow);
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(144, 224, 239, 0.3);
}

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

.history-date {
    font-weight: 500;
    color: var(--primary);
}

.history-amount {
    font-weight: bold;
    color: var(--accent);
}

.history-goal {
    font-size: 0.8rem;
    color: var(--gray);
}

.settings-header h2 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.settings-group {
    background: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px var(--shadow);
}

.settings-group h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item label {
    color: var(--primary);
    font-weight: 500;
}

.setting-item input,
.setting-item select {
    padding: 0.5rem;
    border: 2px solid rgba(144, 224, 239, 0.5);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--white);
    min-width: 120px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

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

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

.settings-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent) 0%, var(--light-blue) 100%);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow);
}

.danger-btn {
    background: var(--danger);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.danger-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
}

.faq-section {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 8px 30px var(--shadow);
}

.faq-section h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    border: 2px solid rgba(144, 224, 239, 0.3);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 15px var(--shadow);
}

.faq-question {
    width: 100%;
    background: linear-gradient(135deg, var(--very-light-blue) 0%, rgba(144, 224, 239, 0.3) 100%);
    border: none;
    padding: 1rem 1.5rem;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--accent) 100%);
    color: var(--white);
}

.faq-icon {
    font-size: 1.2rem;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 1.5rem;
    background: var(--white);
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-answer[aria-hidden="false"] {
    padding: 1rem 1.5rem;
    max-height: 200px;
}

.faq-answer p {
    color: var(--gray);
    line-height: 1.6;
    margin: 0;
}

.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--light-blue) 100%);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 30px var(--shadow);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    max-width: 300px;
}

.notification-toast.show {
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

footer {
    background: var(--primary);
    color: var(--white);
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .app-main {
        padding: 2rem;
    }
    
    .container-buttons {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .activity-controls {
        flex-direction: row;
        align-items: center;
    }
    
    .settings-actions {
        flex-direction: row;
        justify-content: center;
    }
    
    .main-nav {
        gap: 1rem;
    }
    
    .nav-btn {
        padding: 1rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .app-header {
        padding: 0.75rem;
    }
    
    .app-header h1 {
        font-size: 1.5rem;
    }
    
    .nav-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .progress-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .container-buttons {
        grid-template-columns: 1fr;
    }
    
    .stats-overview {
        grid-template-columns: 1fr;
    }
    
    .history-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .setting-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .notification-toast {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .notification-toast.show {
        transform: translateY(0);
    }
}
