:root {
    --bg-color: #0a0a0f;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #9ba1a6;
    --accent-glow: #4facfe;
    --accent-glow-2: #00f2fe;
    --success-color: #2ed573;
    --danger-color: #ff4757;
    
    --ring-radius: 26;
    --ring-circumference: calc(2 * 3.14159 * var(--ring-radius));
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 20px;
}

/* Background elements for premium aesthetic */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: drift 20s infinite alternate ease-in-out;
}

.orb-1 {
    top: -100px;
    left: -100px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
}

.orb-2 {
    bottom: -150px;
    right: -100px;
    background: radial-gradient(circle, #7367f0 0%, transparent 70%);
    animation-delay: -5s;
}

@keyframes drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Main App Container */
.app-container {
    background: rgba(15, 15, 22, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    width: 100%;
    max-width: 420px;
    padding: 32px 24px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Header & Progress Ring */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.title-area h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #a8b0c4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

.title-area .subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.progress-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle {
    transition: stroke-dashoffset 0.5s ease-in-out;
}

.progress-text {
    position: absolute;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Date Navigation */
.date-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 12px 16px;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

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

.today-btn {
    margin-left: 8px;
}

.current-date-display {
    text-align: center;
    flex: 1;
}

#current-day-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 2px;
}

#current-date-formatted {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Medication List */
.medication-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dose-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.dose-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Checked state for dose card */
.dose-card.checked {
    background: rgba(46, 213, 115, 0.05);
    border-color: rgba(46, 213, 115, 0.2);
}

.dose-card.checked::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--success-color);
    box-shadow: 0 0 10px var(--success-color);
}

.dose-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 50px;
}

.dose-time .time {
    font-size: 1.2rem;
    font-weight: 700;
}

.dose-time .ampm {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.dose-details {
    flex: 1;
}

.dose-details h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.dose-details p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.dose-card.checked .dose-details h3 {
    color: var(--success-color);
}

.dose-card.checked .dose-details p {
    text-decoration: line-through;
    opacity: 0.7;
}

/* Checkbox button */
.check-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    outline: none;
}

.checkmark-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--text-secondary);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.checkmark-circle svg {
    width: 16px;
    height: 16px;
    stroke: var(--bg-color);
    stroke-dasharray: 24;
    stroke-dashoffset: 24;
    transition: stroke-dashoffset 0.4s ease 0.1s;
}

.dose-card.checked .checkmark-circle {
    background: var(--success-color);
    border-color: var(--success-color);
    box-shadow: 0 0 15px rgba(46, 213, 115, 0.4);
    transform: scale(1.1);
}

.dose-card.checked .checkmark-circle svg {
    stroke-dashoffset: 0;
}

/* Toast Notification */
.toast {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 20px;
    border-radius: 100px;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
}

.toast.hidden {
    display: none;
}

.toast.visible {
    transform: translateX(-50%) translateY(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.toast-icon {
    font-size: 1.2rem;
}
