/**
 * PetTimer - Cronômetro Inteligente para Rotinas Pet
 * Desenvolvido por B20 Conteúdo Digital
 * https://www.b20.com.br
 * Todos os direitos reservados
 */

/* ========================================
   CSS VARIABLES & RESET
   ======================================== */

:root {
    /* Color Palette - Brown/Tan Pet Theme */
    --primary-color: #8B4513;
    --primary-light: #A0522D;
    --primary-dark: #654321;
    --secondary-color: #CD853F;
    --accent-color: #DEB887;
    --accent-light: #F5DEB3;
    
    /* Semantic Colors (Light theme default) */
    --bg-color: #FFFFFF;
    --bg-secondary: #FAFAFA;
    --text-color: #1a1a1a;
    --text-muted: #666666;
    --text-light: #999999;
    --border-color: rgba(0, 0, 0, 0.08);
    
    /* Category Colors */
    --color-food: #FF6B6B;
    --color-medicine: #4ECDC4;
    --color-walk: #95E1D3;
    --color-training: #F38181;
    --color-rest: #AA96DA;
    
    /* UI Elements */
    --border-radius: 16px;
    --border-radius-small: 8px;
    --spacing-unit: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-small: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-large: 0 8px 32px rgba(0, 0, 0, 0.15);
    
    /* Safe Areas */
    --safe-area-top: env(safe-area-inset-top);
    --safe-area-bottom: env(safe-area-inset-bottom);
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

:root[data-theme="dark"] {
    --bg-color: #121212;
    --bg-secondary: #1e1e1e;
    --text-color: #F5F5F5;
    --text-muted: #C8C8C8;
    --text-light: #A0A0A0;
    --border-color: rgba(255, 255, 255, 0.08);
    --shadow-small: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-large: 0 8px 32px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --bg-color: #121212;
        --bg-secondary: #1e1e1e;
        --text-color: #F5F5F5;
        --text-muted: #C8C8C8;
        --text-light: #A0A0A0;
        --border-color: rgba(255, 255, 255, 0.08);
        --shadow-small: 0 2px 8px rgba(0, 0, 0, 0.3);
        --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.4);
        --shadow-large: 0 8px 32px rgba(0, 0, 0, 0.5);
    }
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding-top: calc(70px + var(--safe-area-top));
    padding-bottom: calc(70px + var(--safe-area-bottom));
    overflow-x: hidden;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: calc(var(--spacing-unit) * 2);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ========================================
   APP HEADER (Sticky)
   ======================================== */

.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    padding: calc(var(--spacing-unit) * 2);
    padding-top: calc(var(--spacing-unit) * 2 + var(--safe-area-top));
    z-index: 1000;
    box-shadow: var(--shadow-medium);
    backdrop-filter: blur(10px);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: calc(var(--spacing-unit) * 2);
    flex-wrap: wrap;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 1.5);
}

.top-nav {
    display: none;
    padding: 0;
    gap: calc(var(--spacing-unit) * 2);
    align-items: center;
    justify-content: center;
}

.top-nav .nav-item {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    padding: calc(var(--spacing-unit) * 1.5);
    border-bottom: 2px solid transparent;
}

.top-nav .nav-item.active {
    color: #fff;
    border-bottom-color: #fff;
}

.top-nav .nav-item i {
    margin-bottom: 2px;
}

.app-title {
    color: white;
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 1.5);
}

.app-title i {
    font-size: 1.75rem;
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    padding: 4px;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: -999px;
    background: #000;
    color: #fff;
    padding: 12px 16px;
    z-index: 2000;
    border-radius: 6px;
    box-shadow: var(--shadow-medium);
}

.skip-link:focus {
    left: 16px;
    top: 16px;
}

.btn-add-timer {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    min-width: 48px;
    min-height: 48px;
}

.btn-add-timer:hover {
    background: white;
    color: var(--primary-color);
    transform: scale(1.1) rotate(90deg);
}

.btn-add-timer:active {
    transform: scale(0.95) rotate(90deg);
}

/* Theme toggle */
.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    min-width: 48px;
    min-height: 48px;
}

.theme-toggle:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

.theme-toggle:active {
    transform: translateY(0);
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.main-content {
    min-height: calc(100vh - 140px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 2);
}

.section-view {
    display: none;
}

.section-view.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.welcome-message {
    text-align: center;
    margin-bottom: calc(var(--spacing-unit) * 4);
}

.welcome-message h2 {
    color: var(--primary-color);
    margin-bottom: calc(var(--spacing-unit));
}

.welcome-message p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: calc(var(--spacing-unit) * 3);
}

/* ========================================
   TIMER CARDS (Instagram Stories Style)
   ======================================== */

.timers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: calc(var(--spacing-unit) * 3);
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.timer-card {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
    position: relative;
    border: 1px solid var(--border-color);
}

.timer-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-large);
}

.timer-card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    padding: calc(var(--spacing-unit) * 2);
    color: white;
    position: relative;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    isolation: isolate;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.timer-card-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.35) 100%);
    z-index: 0;
}

.timer-card-header > * {
    position: relative;
    z-index: 1;
}

.timer-card-header.food {
    background: linear-gradient(135deg, #d94b4b 0%, #ff6b6b 50%, #c73b3b 100%);
}

.timer-card-header.medicine {
    background: linear-gradient(135deg, #1fa69b 0%, #38c7bd 50%, #1b8c82 100%);
}

.timer-card-header.walk {
    background: linear-gradient(135deg, #43b69b 0%, #70d3c3 50%, #3aa28f 100%);
}

.timer-card-header.training {
    background: linear-gradient(135deg, #d65858 0%, #f38181 50%, #c34646 100%);
}

.timer-card-header.rest {
    background: linear-gradient(135deg, #7f6bb8 0%, #aa96da 50%, #6d5aa7 100%);
}

.timer-card-category {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit));
    font-size: 0.9rem;
    opacity: 0.9;
}

.timer-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.timer-card-body {
    padding: calc(var(--spacing-unit) * 3);
    text-align: center;
    background: var(--bg-secondary);
}

.timer-display {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.timer-display.finished {
    color: var(--color-food);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.timer-progress {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.timer-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.timer-actions {
    display: flex;
    gap: calc(var(--spacing-unit));
    justify-content: center;
}

.timer-info {
    display: flex;
    justify-content: space-around;
    padding: calc(var(--spacing-unit) * 2);
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
}

.timer-info-item {
    text-align: center;
}

.timer-info-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
}

.timer-info-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: calc(var(--spacing-unit));
    padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 3);
    min-height: 48px;
    min-width: 48px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

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

.btn:focus-visible,
.nav-item:focus-visible,
.faq-question:focus-visible,
.modal-close:focus-visible,
.theme-toggle:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(0,0,0,0.08);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

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

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-icon {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
}

.btn-small {
    padding: calc(var(--spacing-unit)) calc(var(--spacing-unit) * 2);
    font-size: 0.9rem;
    min-height: 36px;
}

.btn-success {
    background: #4CAF50;
    color: white;
}

.btn-danger {
    background: #F44336;
    color: white;
}

.btn-warning {
    background: #FF9800;
    color: white;
}

/* ========================================
   EMPTY STATES
   ======================================== */

.empty-state {
    text-align: center;
    padding: calc(var(--spacing-unit) * 6) calc(var(--spacing-unit) * 2);
    display: none;
}

.empty-state.show {
    display: block;
}

.empty-state h3 {
    color: var(--text-color);
    margin-top: calc(var(--spacing-unit) * 2);
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: calc(var(--spacing-unit) * 3);
}

/* ========================================
   PETS GRID
   ======================================== */

.pets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: calc(var(--spacing-unit) * 2);
}

.pet-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: calc(var(--spacing-unit) * 3);
    text-align: center;
    box-shadow: var(--shadow-small);
    transition: var(--transition);
    position: relative;
}

.pet-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.pet-icon {
    font-size: 4rem;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.pet-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: calc(var(--spacing-unit));
}

.pet-type {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.pet-actions {
    margin-top: calc(var(--spacing-unit) * 2);
    display: flex;
    gap: calc(var(--spacing-unit));
    justify-content: center;
}

/* ========================================
   HISTORY LIST
   ======================================== */

.history-list {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 2);
}

.history-item {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-small);
    padding: calc(var(--spacing-unit) * 2);
    box-shadow: var(--shadow-small);
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 2);
}

.history-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.history-icon.food { background: var(--color-food); color: white; }
.history-icon.medicine { background: var(--color-medicine); color: white; }
.history-icon.walk { background: var(--color-walk); color: white; }
.history-icon.training { background: var(--color-training); color: white; }
.history-icon.rest { background: var(--color-rest); color: white; }

.history-content {
    flex: 1;
}

.history-title {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
}

.history-details {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ========================================
   MODAL
   ======================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    padding: calc(var(--spacing-unit) * 2);
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-large);
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    padding: calc(var(--spacing-unit) * 3);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: calc(var(--spacing-unit) * 3);
}

/* ========================================
   FORMS
   ======================================== */

.form-group {
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: calc(var(--spacing-unit));
    color: var(--text-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: calc(var(--spacing-unit) * 2);
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-small);
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg-color);
    color: var(--text-color);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: #F44336;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: calc(var(--spacing-unit) * 2);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit));
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: calc(var(--spacing-unit) * 2);
    justify-content: flex-end;
    margin-top: calc(var(--spacing-unit) * 4);
}

/* ========================================
   FAQ
   ======================================== */

.faq-container {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 2);
}

.faq-item {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-small);
    overflow: hidden;
    box-shadow: var(--shadow-small);
}

.faq-question {
    width: 100%;
    padding: calc(var(--spacing-unit) * 2);
    background: var(--bg-secondary);
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    min-height: 48px;
}

.faq-question:hover {
    background: var(--bg-secondary);
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
}

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

.faq-answer {
    padding: 0 calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 2);
    color: var(--text-muted);
    line-height: 1.6;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer:not([hidden]) {
    max-height: 500px;
    padding: calc(var(--spacing-unit) * 2);
}

/* ========================================
   TOAST NOTIFICATION
   ======================================== */

.toast {
    position: fixed;
    bottom: calc(80px + var(--safe-area-bottom));
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-color);
    color: var(--bg-color);
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 3);
    border-radius: var(--border-radius-small);
    opacity: 0;
    transition: var(--transition);
    z-index: 3000;
    max-width: 90%;
    text-align: center;
    box-shadow: var(--shadow-large);
}

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

/* ========================================
   BOTTOM NAVIGATION
   ======================================== */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding-bottom: var(--safe-area-bottom);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: calc(var(--spacing-unit)) calc(var(--spacing-unit) * 2);
    min-width: 64px;
    min-height: 48px;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.nav-item.active {
    color: var(--primary-color);
    background: rgba(139, 69, 19, 0.1);
    border-radius: 10px;
}

.nav-item:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.nav-item span {
    font-size: 11px;
    font-weight: 500;
}

/* ========================================
   FOOTER
   ======================================== */

.app-footer {
    background: var(--bg-secondary);
    padding: calc(var(--spacing-unit) * 4) calc(var(--spacing-unit) * 2);
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-content p {
    margin-bottom: calc(var(--spacing-unit));
    color: var(--text-muted);
}

.b20-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.b20-link:hover {
    text-decoration: underline;
    transform: scale(1.05);
    display: inline-block;
}

.footer-links {
    margin-top: calc(var(--spacing-unit) * 2);
    display: flex;
    justify-content: center;
    gap: calc(var(--spacing-unit) * 2);
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (min-width: 768px) {
    .container {
        padding: calc(var(--spacing-unit) * 10) calc(var(--spacing-unit) * 3);
    }

    .timers-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }

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

@media (min-width: 1024px) {
    .bottom-nav {
        display: none;
    }

    body {
        padding-bottom: 0;
    }

    .top-nav {
        display: flex;
    }

    .timers-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

@media (max-width: 480px) {
    .app-title {
        font-size: 1.25rem;
    }

    .timer-display {
        font-size: 2.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }
}

/* ========================================
   ANIMATIONS & MICRO-INTERACTIONS
   ======================================== */

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--border-radius-small);
}

/* Ripple effect for buttons */
.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;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .app-header,
    .bottom-nav,
    .app-footer,
    .btn,
    .modal {
        display: none !important;
    }

    body {
        padding: 0;
    }
}
