/* Base style reset and variable definitions */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #34495e;
    --danger-color: #e74c3c;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --background-primary: #ffffff;
    --background-secondary: #f5f7fa;
    --border-color: #ecf0f1;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --border-radius: 6px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-secondary);
}

/* Main application container */
#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Application header */
.app-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.app-header h1 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.app-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.app-status-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.5rem;
    background-color: var(--background-secondary);
    border-radius: 20px;
    width: fit-content;
    margin: 0 auto;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--text-secondary);
    transition: var(--transition);
}

.status-indicator.success {
    background-color: #27ae60;
    box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.2);
    animation: pulse-success 2s infinite;
}

.status-indicator.error {
    background-color: var(--danger-color);
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
    animation: pulse-error 2s infinite;
}

.status-indicator.warning {
    background-color: #f39c12;
    box-shadow: 0 0 0 2px rgba(243, 156, 18, 0.2);
    animation: pulse-warning 2s infinite;
}

.status-indicator.active {
    background-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(76, 175, 80, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

@keyframes pulse-success {
    0% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(39, 174, 96, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0);
    }
}

@keyframes pulse-error {
    0% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(231, 76, 60, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

@keyframes pulse-warning {
    0% {
        box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(243, 156, 18, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(243, 156, 18, 0);
    }
}

#app-status-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Main control panel */
.main-panel {
    flex: 1;
    background: var(--background-primary);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Status display area */
.status-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.reminder-card {
    background: var(--background-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.reminder-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.reminder-card.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #f8fff8 0%, #ffffff 100%);
}

.reminder-card.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
}

#water-card.active::before {
    background: #2196F3;
}

#standup-card.active::before {
    background: #FF9800;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.card-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.card-header h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}



.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.status-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}



.next-reminder-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.time-remaining {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: right;
}

.interval-input {
    width: 50px;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--background-primary);
    text-align: center;
    transition: var(--transition);
}

.interval-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.interval-input:hover {
    border-color: var(--secondary-color);
}

.time-remaining .time-icon {
    font-size: 0.9rem;
    opacity: 0.7;
}

.daily-stats {
    margin-top: 0.25rem;
}

.stats-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.25rem;
}



.countdown-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.countdown-time {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    min-width: 60px;
    text-align: right;
}

.next-reminder {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border-color);
}

.next-reminder-time {
    font-weight: 500;
    color: var(--text-primary);
    min-width: 180px; /* Make wider to fit "XX hours XX mins" format */
    display: inline-block; /* Ensure the width is applied */
}

.activity-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border-color);
}

.activity-status-value {
    font-weight: 500;
    color: var(--primary-color);
}

.activity-status-value.inactive {
    color: var(--text-secondary);
}

.card-controls {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

/* Button styles */
.btn-primary, .btn-secondary, .btn-action, .btn-warning, .btn-close {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

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

.btn-primary:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--background-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

.btn-action {
    background: var(--secondary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-action:hover {
    background: #1976D2;
}

.btn-warning {
    background: #f39c12;
    color: white;
    border: 1px solid #e67e22;
}

.btn-warning:hover {
    background: #e67e22;
    transform: translateY(-1px);
}

.btn-close {
    background: var(--danger-color);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Quick actions area */
.quick-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.quick-actions-group {
    display: flex;
    gap: 0.75rem;
}

/* Status summary area */
.status-summary {
    margin-top: 1rem;
}

.summary-card {
    background: var(--background-secondary);
    border-radius: var(--border-radius);
    padding: 1rem;
}

.summary-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    text-align: center;
}

.summary-content {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1rem;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.summary-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.summary-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Settings panel */
.settings-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: var(--background-primary);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.settings-panel.show {
    right: 0;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.settings-header h2 {
    margin: 0;
    color: var(--text-primary);
}

.settings-content {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.settings-section {
    margin-bottom: 2rem;
    background: var(--background-secondary);
    border-radius: var(--border-radius);
    padding: 1rem;
}

.settings-section h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.setting-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.setting-label {
    flex: 1;
    display: flex;
    flex-direction: column;
}

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

.setting-label small {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.2rem;
}

.setting-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.setting-item label:not(.switch) {
    flex: 1;
    color: var(--text-secondary);
}

.setting-item input[type="number"] {
    width: 90px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--background-primary);
    color: var(--text-primary);
    text-align: center;
}

/* Hide up/down arrows for time input boxes */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

input[type="number"] {
    -moz-appearance: textfield !important;
}

/* Input boxes for specific IDs */
#water-interval::-webkit-outer-spin-button,
#water-interval::-webkit-inner-spin-button,
#water-target::-webkit-outer-spin-button,
#water-target::-webkit-inner-spin-button,
#standup-interval::-webkit-outer-spin-button,
#standup-interval::-webkit-inner-spin-button,
#standup-target::-webkit-outer-spin-button,
#standup-target::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

#water-interval,
#water-target,
#standup-interval,
#standup-target {
    -moz-appearance: textfield !important;
}

/* Input boxes in time display */
.time-hour::-webkit-outer-spin-button,
.time-hour::-webkit-inner-spin-button,
.time-minute::-webkit-outer-spin-button,
.time-minute::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.time-hour,
.time-minute {
    -moz-appearance: textfield !important;
}

/* Broader selector for all possible time input boxes */
.editable-time input[type="number"]::-webkit-outer-spin-button,
.editable-time input[type="number"]::-webkit-inner-spin-button,
.time-remaining input[type="number"]::-webkit-outer-spin-button,
.time-remaining input[type="number"]::-webkit-inner-spin-button,
.card-content input[type="number"]::-webkit-outer-spin-button,
.card-content input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.editable-time input[type="number"],
.time-remaining input[type="number"],
.card-content input[type="number"] {
    -moz-appearance: textfield !important;
}

.setting-item input[type="range"] {
    width: 150px;
    margin-right: 10px;
}

.setting-item select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--background-primary);
    color: var(--text-primary);
    width: 120px;
}

.range-value {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-secondary);
}

.settings-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}



/* Notification popup */
.notification-overlay, .help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.notification-overlay.show, .help-overlay.show {
    display: flex;
}

.notification-modal, .help-modal {
    background: var(--background-primary);
    border-radius: var(--border-radius);
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    animation: modalSlideIn 0.3s ease;
}

.help-modal {
    max-width: 500px;
    text-align: left;
}

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

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

@keyframes permissionSlideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.notification-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.notification-content h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.notification-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.notification-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* In-page notification popup */
.notification-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 320px;
    background: var(--background-primary);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 2500;
    overflow: hidden;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.3s ease;
}

.notification-alert.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-alert .notification-content {
    display: flex;
    padding: 1rem;
}

.notification-alert .notification-icon {
    font-size: 2rem;
    margin-right: 1rem;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-alert .notification-text {
    flex: 1;
}

.notification-alert .notification-title {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.notification-alert .notification-message {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.notification-alert .notification-actions {
    display: flex;
    padding: 0 1rem 1rem;
    justify-content: flex-end;
}

.notification-alert .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 4px;
    cursor: pointer;
}

.notification-alert .btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
}

.notification-alert .btn-secondary {
    background: var(--background-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    margin-left: 0.5rem;
}

.notification-alert .btn-close {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    padding: 0;
}

/* Different styles for water and standup reminders */
.notification-water {
    border-top: 3px solid #2196F3;
}

.notification-water .notification-icon {
    color: #2196F3;
}

.notification-standup {
    border-top: 3px solid #FF9800;
}

.notification-standup .notification-icon {
    color: #FF9800;
}

/* Permission request prompt */
.permission-prompt {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    width: 90%;
    max-width: 500px;
    background: var(--background-primary);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    z-index: 2500;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s ease;
}

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

.permission-prompt .prompt-content {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.permission-prompt .prompt-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.permission-prompt .prompt-text {
    text-align: center;
    margin-bottom: 1.5rem;
}

.permission-prompt .prompt-text h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.permission-prompt .prompt-text p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.permission-prompt .prompt-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Help panel */
.help-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.help-content h3 {
    margin: 1.5rem 0 0.5rem 0;
    color: var(--text-primary);
}

.help-content ul, .help-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.help-content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* Responsive design */
@media (max-width: 768px) {
    #app {
        padding: 10px;
    }
    
    .main-panel {
        padding: 1rem;
    }
    
    .status-section {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .card-header {
        justify-content: space-between;
    }
    
    .card-content {
        text-align: left;
    }
    
    .status-info {
        flex-direction: row;
        gap: 0.5rem;
        justify-content: flex-end;
        align-items: center;
    }
    
    .next-reminder, .activity-status {
        flex-direction: row;
        gap: 0.25rem;
        justify-content: space-between;
    }
    
    .card-controls {
        flex-direction: row;
        justify-content: flex-end;
    }
    
    .settings-panel {
        width: 100%;
        right: -100%;
    }
    
    .quick-actions {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    
    .quick-actions-group {
        flex-direction: row;
        width: auto;
        gap: 0.5rem;
    }
    
    .btn-action {
        width: auto;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .summary-content {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        justify-content: space-around;
    }
    
    .summary-item {
        width: auto;
        flex-direction: column;
        align-items: center;
    }
    
    /* Touch-friendly adjustments */
    button, .btn-primary, .btn-secondary, .btn-action {
        min-height: 44px; /* Minimum touch target size */
    }
    
    .setting-item input[type="range"] {
        height: 30px;
    }
    
    /* Improved touch targets for settings */
    .setting-item {
        padding: 0.5rem 0;
    }
    
    /* Swipe gesture area */
    .swipe-area {
        position: fixed;
        top: 0;
        right: 0;
        width: 20px;
        height: 100%;
        z-index: 999;
    }
    
    /* Mobile notification adjustments */
    .notification-alert {
        width: calc(100% - 20px);
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .app-header h1 {
        font-size: 1.5rem;
    }
    
    .app-subtitle {
        font-size: 0.9rem;
    }
    
    .notification-modal, .help-modal {
        width: 95%;
        padding: 1.5rem;
    }
    
    .notification-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .notification-actions button {
        width: 100%;
    }
    
    .settings-footer {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .settings-footer button {
        width: 100%;
    }
    
    .quick-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }
    
    .quick-actions-group {
        width: 100%;
        justify-content: space-between;
    }
    
    .quick-actions-group button {
        flex: 1;
        text-align: center;
        padding: 0.75rem 0.5rem;
    }
    
    /* Adjust card controls for better mobile experience */
    .card-controls {
        justify-content: space-between;
        margin-top: 1rem;
    }
    
    .card-controls button {
        flex: 1;
        margin: 0 0.25rem;
    }
    
    /* Improve settings panel for small screens */
    .settings-content {
        padding: 0.75rem;
    }
    
    .settings-section {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .setting-label {
        margin-bottom: 0.5rem;
    }
    
    .setting-control {
        width: 100%;
        justify-content: space-between;
    }
    

}

/* Portrait orientation specific styles */
@media (max-width: 480px) and (orientation: portrait) {
    .status-section {
        margin-bottom: 1rem;
    }
    
    .reminder-card {
        padding: 1rem;
    }
}

/* Landscape orientation specific styles */
@media (max-height: 480px) and (orientation: landscape) {
    .app-header {
        margin-bottom: 1rem;
    }
    
    .app-header h1 {
        font-size: 1.3rem;
    }
    
    .app-subtitle {
        display: none;
    }
    
    .status-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .reminder-card {
        padding: 0.75rem;
    }
    
    .card-header {
        padding-bottom: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .card-content {
        gap: 0.5rem;
    }
    
    .status-summary {
        margin-top: 0.5rem;
    }
}

/* Switch styles */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-right: 10px;
    flex-shrink: 0;
}

.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: 24px;
}

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

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

input:focus + .slider {
    box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}/* Mob
ile-specific enhancements */
.mobile-touch-feedback {
    position: relative;
    overflow: hidden;
}

.mobile-touch-feedback::after {
    content: '';
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255,255,255,0.3) 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 0.5s;
}

.mobile-touch-feedback:active::after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

/* Mobile gesture support */
.swipe-indicator {
    position: fixed;
    top: 50%;
    right: 0;
    width: 5px;
    height: 60px;
    background-color: rgba(76, 175, 80, 0.3);
    border-radius: 3px 0 0 3px;
    transform: translateY(-50%);
    z-index: 990;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.swipe-indicator:hover,
.swipe-indicator:active {
    opacity: 0.8;
}

/* Mobile notification styles */
@media (max-width: 768px) {
    .notification-alert {
        bottom: 20px;
        top: auto;
        left: 50%;
        right: auto;
        transform: translateX(-50%) translateY(100px);
        width: 90%;
        max-width: 400px;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    }
    
    .notification-alert.show {
        transform: translateX(-50%) translateY(0);
    }
    
    /* Fullscreen notification for mobile */
    .notification-overlay .notification-modal {
        width: 90%;
        max-width: 350px;
        padding: 1.5rem;
    }
    
    /* Touch-friendly buttons */
    .notification-actions .btn-primary,
    .notification-actions .btn-secondary {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        border-radius: 8px;
    }
    
    /* Settings panel mobile adjustments */
    .settings-panel.show {
        box-shadow: -5px 0 25px rgba(0,0,0,0.25);
    }
    
    /* Mobile-friendly range inputs */
    input[type="range"] {
        -webkit-appearance: none;
        height: 6px;
        background: var(--background-secondary);
        border-radius: 3px;
        width: 100%;
    }
    
    input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 20px;
        height: 20px;
        background: var(--primary-color);
        border-radius: 50%;
        cursor: pointer;
    }
    
    input[type="range"]::-moz-range-thumb {
        width: 20px;
        height: 20px;
        background: var(--primary-color);
        border-radius: 50%;
        cursor: pointer;
        border: none;
    }
}

/* Tablet-specific adjustments */
@media (min-width: 481px) and (max-width: 768px) {
    .status-section {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quick-actions {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .settings-panel {
        width: 80%;
        right: -80%;
    }
}

/* Accessibility improvements for mobile */
@media (max-width: 768px) {
    /* Increase contrast for better readability on mobile */
    .text-secondary {
        color: #555;
    }
    
    /* Increase touch targets for better accessibility */
    .setting-item label.switch {
        width: 54px;
        height: 28px;
    }
    
    .setting-item .slider:before {
        height: 20px;
        width: 20px;
    }
    
    /* Improve form controls for touch */
    select, input[type="number"] {
        font-size: 16px; /* Prevents iOS zoom on focus */
        padding: 0.6rem;
    }
}
/* First-time use guide styles */
.guide-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.guide-modal {
    background-color: var(--background-primary);
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
    animation: bounceIn 0.5s ease-out;
}

.guide-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.guide-header .btn-close {
    position: relative;
    z-index: 10;
    pointer-events: auto;
    cursor: pointer;
}

.guide-content {
    padding: 1.5rem;
}

.guide-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.guide-footer button {
    position: relative;
    z-index: 10;
    pointer-events: auto;
    cursor: pointer;
}

.guide-step {
    display: flex;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.guide-step:last-child {
    margin-bottom: 0;
}

.guide-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    margin-right: 1rem;
    flex-shrink: 0;
}

.guide-step-content {
    flex-grow: 1;
}

.guide-step-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.guide-step-content p {
    margin: 0;
    color: var(--text-secondary);
}

@keyframes bounceIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    70% {
        transform: scale(1.05);
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}

/* Mobile adaptation */
@media (max-width: 480px) {
    .guide-modal {
        width: 95%;
        padding: 0;
    }
    
    .guide-header {
        padding: 0.75rem 1rem;
    }
    
    .guide-content {
        padding: 1rem;
    }
    
    .guide-footer {
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .guide-footer button {
        width: 100%;
    }
    
    .guide-step-number {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
}

/* Error handling and compatibility notice styles */
.compatibility-notice {
    background-color: var(--background-primary);
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    overflow-y: auto;
    padding: 0;
    animation: bounceIn 0.5s ease-out;
}

.compatibility-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.compatibility-content {
    padding: 1.5rem;
}

.compatibility-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.compatibility-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.compatibility-content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.compatibility-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Error message styles */
.error-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--danger-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    z-index: 9999;
    font-family: Arial, sans-serif;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: fadeInDown 0.5s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Error type styles */
.error-message.warning {
    background: #FF9800;
}

.error-message.info {
    background: #2196F3;
}

.error-message.success {
    background: var(--primary-color);
}

/* Mobile adaptation */
@media (max-width: 480px) {
    .compatibility-notice {
        width: 95%;
    }
    
    .compatibility-header {
        padding: 0.75rem 1rem;
    }
    
    .compatibility-content {
        padding: 1rem;
    }
    
    .compatibility-footer {
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .compatibility-footer button {
        width: 100%;
    }
    
    .error-message {
        width: 90%;
        padding: 0.75rem 1rem;
    }
}/* I
con styles to replace emojis */
.card-icon {
    width: 32px;
    height: 32px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.water-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233498db'%3E%3Cpath d='M12 2c-5.33 4.55-8 8.48-8 11.8 0 4.98 3.8 8.2 8 8.2s8-3.22 8-8.2c0-3.32-2.67-7.25-8-11.8zm0 18c-3.35 0-6-2.57-6-6.2 0-2.34 1.95-5.44 6-9.14 4.05 3.7 6 6.79 6 9.14 0 3.63-2.65 6.2-6 6.2zm-4-8c0 2.2 1.79 4 4 4 .5 0 .97-.09 1.4-.25-.4.25-.86.39-1.4.39-1.49 0-2.7-1.21-2.7-2.7 0-.54.14-1 .39-1.4-.16.43-.25.9-.25 1.4-.01.69.19 1.36.56 1.96.36-.6.56-1.27.56-1.96 0-2.21-1.79-4-4-4-.5 0-.97.09-1.4.25.4-.25.86-.39 1.4-.39 1.49 0 2.7 1.21 2.7 2.7 0 .54-.14 1-.39 1.4.17-.43.25-.9.25-1.4 0-.69-.19-1.36-.56-1.96-.36.6-.56 1.27-.56 1.96z'/%3E%3C/svg%3E");
}

.standup-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2334495e'%3E%3Cpath d='M12 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4zm-1 17v-8H7v-2h6v10h-2z'/%3E%3Cpath d='M12 12c-1.1 0-2-.9-2-2V7h4v3c0 1.1-.9 2-2 2z'/%3E%3C/svg%3E");
}



/* Button style updates */
.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #34495e;
    transform: translateY(-1px);
}

.btn-action {
    background: var(--secondary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-action:hover {
    background: #2980b9;
}

/* Card style updates */
.reminder-card.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

#water-card.active::before {
    background: #3498db;
}

#standup-card.active::before {
    background: #34495e;
}

/* Status indicator updates */
.status-indicator.active {
    background-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(44, 62, 80, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(44, 62, 80, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(44, 62, 80, 0);
    }
}/* E
ditable time display styles */
.editable-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 600;
}

.time-hour,
.time-minute {
    width: 2.5rem;
    padding: 0.2rem 0.3rem;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 600;
    background: var(--background-primary);
    color: var(--text-primary);
    transition: var(--transition);
}

.time-hour:focus,
.time-minute:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.time-separator {
    font-weight: bold;
    color: var(--text-primary);
    margin: 0 0.1rem;
}

.time-update-btn {
    padding: 0.2rem 0.5rem;
    margin-left: 0.5rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 3px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.time-update-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

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

/* Mobile responsive adjustments for editable time */
@media (max-width: 768px) {
    .editable-time {
        font-size: 1rem;
    }
    
    .time-hour,
    .time-minute {
        width: 2.2rem;
        font-size: 0.9rem;
    }
    
    .time-update-btn {
        font-size: 0.7rem;
        padding: 0.15rem 0.4rem;
    }
}