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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px 20px 20px;
    position: relative;
    overflow: hidden;
}

/* Animated background bubbles */
body::before,
body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite ease-in-out;
}

body::before {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

body::after {
    width: 400px;
    height: 400px;
    bottom: -150px;
    right: -150px;
    animation-delay: 5s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(50px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-30px, 30px) scale(0.9);
    }
}

.container {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 28px;
    padding: 28px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    animation: slideIn 0.5s ease-out;
}

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

.header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    position: relative;
}

.icon {
    font-size: 36px;
    filter: drop-shadow(0 2px 8px rgba(102, 126, 234, 0.3));
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

h1 {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    flex: 1;
}

.refresh-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.refresh-btn:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    transform: scale(1.05);
}

.refresh-btn:active {
    transform: scale(0.95) rotate(180deg);
}

.refresh-btn.spinning {
    animation: spin 0.6s ease-in-out;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.progress-section {
    text-align: center;
    margin-bottom: 24px;
}

.label {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.amount {
    font-size: 36px;
    margin-bottom: 12px;
    line-height: 1;
}

.current {
    font-weight: 700;
    color: #1e293b;
    transition: all 0.3s ease;
}

.current.goal-reached {
    color: #10b981;
    animation: pulse 1s ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.total {
    font-weight: 400;
    color: #cbd5e1;
    font-size: 24px;
}

#goalDisplay {
    color: #94a3b8;
    font-weight: 600;
}

.goal-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 6px 12px;
    background: rgba(148, 163, 184, 0.08);
    border-radius: 10px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.goal-label {
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    user-select: none;
}

.goal-btn {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    color: #475569;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    line-height: 1;
    padding: 0;
}

.goal-btn:hover {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    transform: scale(1.1);
}

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

.water-container {
    position: relative;
    width: 100%;
    max-width: 110px;
    height: 190px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glass-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 10px 30px rgba(59, 130, 246, 0.2));
}

#waterRect {
    transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                y 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#wave1, #wave2 {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes waveMove1 {
    0%, 100% {
        d: path("M 0 0 Q 18.68 -3 37.35 0 T 74.71 0 L 74.71 10 L 0 10 Z");
    }
    50% {
        d: path("M 0 0 Q 18.68 3 37.35 0 T 74.71 0 L 74.71 10 L 0 10 Z");
    }
}

@keyframes waveMove2 {
    0%, 100% {
        d: path("M 0 0 Q 18.68 3 37.35 0 T 74.71 0 L 74.71 10 L 0 10 Z");
    }
    50% {
        d: path("M 0 0 Q 18.68 -3 37.35 0 T 74.71 0 L 74.71 10 L 0 10 Z");
    }
}

.controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.btn {
    height: 56px;
    border: none;
    border-radius: 14px;
    font-size: 28px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-minus {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #64748b;
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.1);
}

.btn-minus:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(100, 116, 139, 0.15);
}

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

.btn-plus {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-plus:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

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

.cup-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 14px;
    border: 2px solid rgba(148, 163, 184, 0.1);
}

.cup-selector label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cup-select {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cup-select:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.cup-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.reminder-buttons {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    align-items: stretch;
}

.setup-btn {
    width: 50px;
    min-width: 50px;
    flex-shrink: 0;
    padding: 14px 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(148, 163, 184, 0.3);
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.setup-btn:hover {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(148, 163, 184, 0.4);
}

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

.run-btn {
    flex: 1;
    padding: 14px 20px;
    border-radius: 14px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.run-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

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

.android-btn {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 14px 20px;
    border-radius: 14px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    text-align: center;
    text-decoration: none;
}

.android-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

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

/* Responsive */
@media (max-width: 480px) {
    .card {
        padding: 30px 24px;
    }
    
    h1 {
        font-size: 36px;
    }
    
    .amount {
        font-size: 40px;
    }
    
    .icon {
        font-size: 40px;
    }
    
    .cup-selector {
        flex-direction: column;
        gap: 8px;
    }
}
