/* ===== ROOT VARIABLES ===== */
:root {
    --primary-color: #10b981;
    --primary-dark: #059669;
    --secondary-color: #3b82f6;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --success-color: #10b981;
    --bg-color: #f9fafb;
    --card-bg: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--primary-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== APP CONTAINER ===== */
.app-container {
    min-height: 100vh;
    padding-bottom: 80px;
}

.screen {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== SETUP SCREEN ===== */
.setup-container {
    padding-bottom: 40px;
}

.setup-container h1 {
    font-size: 32px;
    margin-bottom: 8px;
    text-align: center;
    color: var(--primary-color);
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 16px;
}

.form-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.form-section h2 {
    font-size: 20px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.info-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg-color);
    border-radius: 8px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: white;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ===== BUTTONS ===== */
.btn {
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-large {
    width: 100%;
    padding: 18px;
    font-size: 18px;
    margin-top: 20px;
}

.icon-btn {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
}

/* ===== DASHBOARD ===== */
.dashboard-container {
    padding-bottom: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.header h1 {
    font-size: 24px;
    color: var(--primary-color);
}

/* Timer Card */
.timer-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 24px;
    padding: 32px;
    text-align: center;
    color: white;
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
}

.status-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.timer-display {
    font-size: 56px;
    font-weight: 700;
    margin: 16px 0;
    font-variant-numeric: tabular-nums;
}

.timer-label {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.schedule-info {
    font-size: 14px;
    opacity: 0.8;
}

/* Goal Card */
.goal-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.goal-card h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.goal-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.weight-start,
.weight-target {
    font-size: 24px;
    font-weight: 700;
}

.weight-start {
    color: var(--text-secondary);
}

.weight-target {
    color: var(--primary-color);
}

.arrow {
    font-size: 24px;
    color: var(--text-secondary);
}

.goal-remaining {
    text-align: center;
    color: var(--text-secondary);
    font-size: 16px;
}

/* Quote Card */
.quote-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.quote-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.quote-text {
    font-size: 16px;
    line-height: 1.6;
    font-style: italic;
    color: var(--text-primary);
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 24px;
}

.action-btn {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 24px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    line-height: 1.5;
}

.action-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ===== SCREEN HEADER ===== */
.screen-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    gap: 12px;
}

.back-btn {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.back-btn:hover {
    border-color: var(--primary-color);
}

.screen-header h2 {
    font-size: 24px;
    color: var(--text-primary);
}

/* ===== CALENDAR ===== */
.calendar-container {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-controls h3 {
    font-size: 20px;
}

.nav-btn {
    background: var(--bg-color);
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 20px;
    cursor: pointer;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
}

.calendar-day.header {
    font-weight: 700;
    color: var(--text-secondary);
    cursor: default;
}

.calendar-day.day {
    background: var(--bg-color);
    border: 2px solid transparent;
}

.calendar-day.day:hover {
    border-color: var(--primary-color);
}

.calendar-day.today {
    border-color: var(--primary-color);
    background: rgba(16, 185, 129, 0.1);
}

.calendar-day.other-month {
    opacity: 0.3;
}

.day-number {
    font-weight: 600;
    margin-bottom: 4px;
}

.day-icon {
    font-size: 18px;
}

.day-status {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 12px;
}

.calendar-legend {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.legend-icon {
    font-size: 18px;
}

/* ===== PROGRESS SCREEN ===== */
.progress-container {
    padding-bottom: 20px;
}

.weight-input-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.weight-input-card h3 {
    font-size: 18px;
    margin-bottom: 16px;
}

.weight-input-group {
    display: flex;
    gap: 12px;
}

.weight-input-group input {
    flex: 1;
    padding: 16px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
}

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

.stats-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px 12px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.3;
}

.chart-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.chart-header h3 {
    font-size: 18px;
    margin: 0;
}

.chart-filters {
    display: flex;
    gap: 8px;
}

.filter-btn {
    padding: 6px 12px;
    font-size: 13px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: var(--border-color);
}

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

.chart-card h3 {
    font-size: 18px;
    margin-bottom: 16px;
}

#weight-chart {
    width: 100% !important;
    height: 300px !important;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

/* BMI Card */
.bmi-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    color: white;
}

.bmi-card h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: white;
}

.bmi-display {
    text-align: center;
    margin-bottom: 16px;
}

.bmi-value {
    font-size: 48px;
    font-weight: bold;
    color: white;
    margin-bottom: 8px;
}

.bmi-category {
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.bmi-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.bmi-input-group input {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 12px;
    outline: none;
}

.bmi-input-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.bmi-input-group input:focus {
    border-color: rgba(255, 255, 255, 0.6);
}

/* Enhanced Stat Cards */
.stat-card-enhanced {
    position: relative;
    overflow: visible;
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.stat-progress-bar {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin-top: 12px;
    overflow: hidden;
}

.stat-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    transition: width 1s ease-out;
    width: 0;
}

.stat-detail {
    font-size: 12px;
    margin-top: 8px;
    font-weight: 500;
}

/* Achievement Badges */
.achievement-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.achievement-section h3 {
    font-size: 18px;
    margin-bottom: 16px;
}

.badge-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.badge {
    background: var(--bg-primary);
    border: 2px solid;
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    transition: transform 0.2s;
}

.badge:hover {
    transform: translateY(-4px);
}

.badge-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.badge-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Prediction Card */
.prediction-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    color: white;
}

.prediction-card h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: white;
}

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

.prediction-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.prediction-label {
    font-size: 13px;
    margin-bottom: 8px;
    opacity: 0.9;
}

.prediction-value {
    font-size: 20px;
    font-weight: bold;
}

.prediction-note {
    font-size: 13px;
    text-align: center;
    opacity: 0.9;
    margin: 0;
}

.prediction-warning {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.no-data {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

/* Weight History Table */
.history-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow);
}

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

.history-header h3 {
    font-size: 18px;
    margin: 0;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.history-table-container {
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table thead {
    background: var(--bg-primary);
}

.history-table th {
    padding: 12px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
}

.history-table td {
    padding: 12px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
}

.history-table tbody tr:hover {
    background: var(--bg-primary);
}

.change-down {
    color: var(--success-color);
    font-weight: 600;
}

.change-up {
    color: var(--error-color);
    font-weight: 600;
}

.change-neutral {
    color: var(--text-muted);
}

.btn-delete {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-delete:hover {
    background: var(--error-color);
    transform: scale(1.1);
}

/* ===== MOTIVATION SCREEN ===== */
.motivation-container {
    padding-bottom: 20px;
}

.my-why-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.my-why-card h3 {
    font-size: 18px;
    margin-bottom: 16px;
}

.my-why-card textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    resize: vertical;
    font-family: inherit;
    margin-bottom: 12px;
}

.my-why-card textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.quotes-section,
.tips-section {
    margin-bottom: 24px;
}

.quotes-section h3,
.tips-section h3 {
    font-size: 20px;
    margin-bottom: 16px;
}

.quotes-list,
.tips-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quote-item,
.tip-item {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.tip-item {
    border-left-color: var(--secondary-color);
}

.quote-item p,
.tip-item p {
    font-size: 15px;
    line-height: 1.6;
}

.quote-item {
    font-style: italic;
}

/* ===== BOTTOM NAVIGATION ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.nav-item {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 8px;
}

.nav-icon {
    font-size: 24px;
    filter: grayscale(1);
    transition: filter 0.3s;
}

.nav-label {
    font-size: 12px;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.nav-item.active .nav-icon {
    filter: grayscale(0);
}

.nav-item.active .nav-label {
    color: var(--primary-color);
    font-weight: 600;
}

.nav-item:hover {
    background: var(--bg-color);
}

/* ===== RESPONSIVE ===== */
@media (min-width: 768px) {
    .screen {
        padding: 40px;
    }

    .quick-actions {
        grid-template-columns: repeat(3, 1fr);
    }

    .stats-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== UTILITIES ===== */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

/* ===== ENHANCED TIMER CARD ANIMATIONS ===== */

/* Circular Progress Ring */
.timer-ring-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 20px auto;
}

.timer-ring {
    transform: rotate(-90deg);
    filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.3));
}

.timer-ring-circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 10;
}

.timer-ring-circle {
    fill: none;
    stroke: white;
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}

.timer-display-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.timer-display {
    font-size: 32px !important;
    font-weight: 700;
    margin: 0 !important;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Timer Progress Bar */
.timer-progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 20px;
}

.timer-progress-bar {
    height: 100%;
    background: white;
    border-radius: 10px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Pulse Warning Animation */
@keyframes pulseWarning {
    0%, 100% {
        transform: scale(1);
        color: white;
    }
    50% {
        transform: scale(1.05);
        color: #fef3c7;
    }
}

.pulse-warning {
    animation: pulseWarning 1s ease-in-out infinite;
}

/* Fasting/Eating Mode Transitions */
.timer-card {
    transition: background 0.5s ease, transform 0.3s ease;
}

.timer-card:hover {
    transform: translateY(-2px);
}

.fasting-mode {
    animation: fadeInGreen 0.5s ease;
}

.eating-mode {
    animation: fadeInBlue 0.5s ease;
}

@keyframes fadeInGreen {
    from {
        background: linear-gradient(135deg, #3b82f6, #2563eb);
    }
    to {
        background: linear-gradient(135deg, #10b981, #059669);
    }
}

@keyframes fadeInBlue {
    from {
        background: linear-gradient(135deg, #10b981, #059669);
    }
    to {
        background: linear-gradient(135deg, #3b82f6, #2563eb);
    }
}

/* ===== ENHANCED GOAL CARD ===== */
.goal-progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin: 16px 0;
}

.goal-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: 10px;
    transition: width 1s ease;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.pulse-arrow {
    display: inline-block;
    animation: pulseArrow 2s ease-in-out infinite;
}

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

/* ===== INTERACTIVE CARDS ===== */
.interactive-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.interactive-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.interactive-card:active {
    transform: translateY(-2px);
}

/* Quote Card Animations */
.quote-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 12px;
    opacity: 0.7;
}

.fade-in-quote {
    animation: fadeInQuote 0.4s ease;
}

.fade-out-quote {
    animation: fadeOutQuote 0.2s ease;
}

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

@keyframes fadeOutQuote {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* ===== ENHANCED QUICK ACTIONS ===== */
.action-btn {
    position: relative;
    overflow: hidden;
}

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

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

/* ===== CALENDAR ENHANCEMENTS ===== */
.calendar-day.day {
    transition: all 0.3s ease;
}

.calendar-day.day:hover {
    transform: scale(1.1);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.calendar-day.day:active {
    transform: scale(0.95);
}

/* ===== WEIGHT INPUT ENHANCEMENTS ===== */
.weight-input-group input {
    transition: all 0.3s ease;
}

.weight-input-group input:focus {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

/* ===== STAT CARDS ANIMATIONS ===== */
.stat-card {
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.stat-value {
    transition: all 0.3s ease;
}

.stat-card:hover .stat-value {
    transform: scale(1.1);
}

/* ===== FLOATING ANIMATION ===== */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.quote-icon {
    animation: float 3s ease-in-out infinite;
}

/* ===== SHAKE ANIMATION (for errors/notifications) ===== */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s;
}

/* ===== RIPPLE EFFECT ===== */
.ripple {
    position: relative;
    overflow: hidden;
}

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

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Ripple Effect Element */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ===== SMOOTH SCROLLING ===== */
html {
    scroll-behavior: smooth;
}

/* ===== GLASSMORPHISM EFFECT (Optional) ===== */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ===== LOADING ANIMATION FOR BUTTONS ===== */
@keyframes buttonLoading {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.btn-loading {
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark), var(--primary-color));
    background-size: 200% 100%;
    animation: buttonLoading 1.5s ease infinite;
}

/* ===== SUCCESS CHECKMARK ANIMATION ===== */
@keyframes checkmark {
    0% {
        transform: scale(0) rotate(45deg);
    }
    50% {
        transform: scale(1.2) rotate(45deg);
    }
    100% {
        transform: scale(1) rotate(45deg);
    }
}

.success-check {
    animation: checkmark 0.5s ease;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(17, 24, 39, 0.95);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    max-width: 90%;
    text-align: center;
}

.toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-success {
    background: linear-gradient(135deg, var(--success-color), var(--primary-dark));
}

.toast-error {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
}

.toast-info {
    background: linear-gradient(135deg, var(--secondary-color), #1d4ed8);
}

/* ===== MOBILE OPTIMIZATIONS ===== */
@media (max-width: 375px) {
    .timer-ring-container {
        width: 180px;
        height: 180px;
    }

    .timer-display {
        font-size: 28px !important;
    }
}

/* ===== DARK MODE READY (Future Enhancement) ===== */
@media (prefers-color-scheme: dark) {
    /* Will be implemented in future version */
}
