/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

:root {
    --primary-blue: #007AFF;
    --light-blue: #E8F4FD;
    --b3-blue: #1E3A8A;
    --b3-blue-light: #3B82F6;
    --text-primary: #1D1D1F;
    --text-secondary: #86868B;
    --bg-primary: #FBFBFD;
    --bg-secondary: #F5F5F7;
    --white: #FFFFFF;
    --shadow-light: 0 2px 16px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 4px 32px rgba(0, 0, 0, 0.08);
    --shadow-strong: 0 8px 48px rgba(0, 0, 0, 0.12);
    --border-radius: 16px;
    --border-radius-large: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    --focus-ring: 0 0 0 3px rgba(0, 122, 255, 0.5);
    --error-color: #FF3B30;
    --success-color: #34C759;
    --warning-color: #FF9500;
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --primary-blue: #0A84FF;
    --light-blue: #1C1C1E;
    --text-primary: #FFFFFF;
    --text-secondary: #8E8E93;
    --bg-primary: #000000;
    --bg-secondary: #1C1C1E;
    --white: #2C2C2E;
    --shadow-light: 0 2px 16px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 4px 32px rgba(0, 0, 0, 0.4);
    --shadow-strong: 0 8px 48px rgba(0, 0, 0, 0.6);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--light-blue) 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

/* Header */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    z-index: 1000;
    padding: 16px 10px;
    transition: var(--transition);
    width: 100%;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
    flex-wrap: nowrap;
}

.brand-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    opacity: 0.8;
    transition: var(--transition);
    filter: brightness(1.1);
}

[data-theme="dark"] .brand-logo {
    filter: brightness(1.2) contrast(1.1);
}

.brand-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

.health-icon {
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Main Content */
.main-content {
    padding-top: 100px;
    padding-bottom: 120px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

/* Hero Section */
.hero-section {
    margin-bottom: 80px;
}

.hero-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--border-radius-large);
    padding: 60px 40px;
    text-align: center;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

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

.hero-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: nowrap;
}

.hero-logo {
    width: 160px;
    height: 160px;
    object-fit: contain;
    opacity: 0.9;
    transition: var(--transition);
    filter: brightness(1.1) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
    flex-shrink: 0;
}

.hero-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

[data-theme="dark"] .hero-logo {
    filter: brightness(1.3) contrast(1.2) drop-shadow(0 4px 12px rgba(255, 255, 255, 0.1));
}

.hero-title {
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, var(--primary-blue), #5856D6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: left;
}

.hero-subtitle {
    font-size: clamp(16px, 3vw, 20px);
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

/* Welcome Section */
.welcome-section {
    margin-bottom: 80px;
}

.welcome-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

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

.welcome-card h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.welcome-card p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 800px;
    margin: 0 auto;
}

/* Info Section */
.info-section {
    margin-bottom: 80px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    /* Desabilitar carousel automático do Chrome */
    overflow: visible !important;
    scroll-snap-type: none !important;
    -webkit-overflow-scrolling: auto !important;
    overscroll-behavior: none !important;
}

.info-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--border-radius);
    padding: 32px;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    cursor: pointer;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    /* Prevenir carousel do Chrome */
    scroll-snap-align: none !important;
    -webkit-scroll-snap-align: none !important;
    touch-action: pan-y !important;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
    background: rgba(255, 255, 255, 0.9);
}

.info-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.info-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Doctor Info Section */
.doctor-info-section {
    margin-bottom: 60px;
}

.doctor-info-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.doctor-info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-strong);
}

.doctor-info-card h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.doctor-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
}

.doctor-details p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.doctor-details strong {
    color: var(--text-primary);
}

/* Scheduling Section */
.scheduling-section {
    margin-bottom: 60px;
}

.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 48px;
    color: var(--text-primary);
}

.scheduling-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.scheduling-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
    max-width: 100%;
    box-sizing: border-box;
}

.scheduling-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-strong);
}

.card-header {
    padding: 32px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-blue) 0%, #5856D6 100%);
    color: white;
}

.card-header h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.card-header p {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.5;
}

.tidycal-container {
    padding: 32px;
    min-height: 400px;
    background: white;
    position: relative;
    overflow: hidden;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.9) 0%, rgba(88, 86, 214, 0.9) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: white;
    padding: 20px 10px;
    z-index: 1000;
    width: 100%;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.doctor-info p {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.footer-disclaimer p {
    font-size: 12px;
    opacity: 0.9;
}

/* IMPORTANTE: Garantir que nada ultrapasse a largura da tela */
img, video, iframe, embed, object {
    max-width: 100%;
    height: auto;
}

.hero-card, .welcome-card, .info-card, .doctor-info-card, .scheduling-card {
    max-width: 100%;
    overflow: hidden;
    word-wrap: break-word;
}

/* Prevenir carousel automático do Chrome */
[data-carousel="none"] {
    overflow-x: visible !important;
    scroll-snap-type: none !important;
    -webkit-scroll-snap-type: none !important;
    -ms-scroll-snap-type: none !important;
}

[data-carousel="none"] > * {
    scroll-snap-align: none !important;
    -webkit-scroll-snap-align: none !important;
}

/* Media Queries Simplificados */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .nav-container {
        padding: 0 16px;
    }
    
    .nav-brand {
        font-size: 16px;
        gap: 8px;
    }
    
    .health-icon {
        font-size: 20px;
    }
    
    .brand-logo {
        width: 28px;
        height: 28px;
    }
    
    .footer-content {
        gap: 8px;
    }
    
    .doctor-info p {
        font-size: 12px;
        line-height: 1.4;
    }
    
    .footer-disclaimer p {
        font-size: 10px;
        line-height: 1.3;
    }
    
    .main-content {
        padding-top: 80px;
        padding-bottom: 140px;
    }
    
    .hero-card {
        padding: 30px 15px;
        margin: 0;
        border-radius: 0;
        width: 100%;
    }
    
    .hero-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .hero-logo {
        width: 112px;
        height: 112px;
    }
    
    .hero-header {
        flex-wrap: wrap;
    }
    
    .hero-title {
        text-align: center;
        font-size: clamp(24px, 6vw, 32px);
    }
    
    .welcome-card {
        padding: 20px 15px;
        margin: 0;
        width: 100%;
    }
    
    .info-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 15px;
        padding: 0;
        /* Forçar desabilitar carousel do Chrome mobile */
        overflow-x: visible !important;
        overflow-y: visible !important;
        scroll-snap-type: none !important;
        -webkit-scroll-snap-type: none !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    
    /* Esconder scrollbars que possam aparecer */
    .info-grid::-webkit-scrollbar {
        display: none !important;
    }
    
    .info-card {
        padding: 20px 15px;
        margin: 0;
        width: 100% !important;
        display: block !important;
        /* Desabilitar snap points do Chrome */
        scroll-snap-align: none !important;
        scroll-snap-stop: normal !important;
        -webkit-scroll-snap-align: none !important;
        -webkit-scroll-snap-stop: normal !important;
        overscroll-behavior: none !important;
        touch-action: pan-y !important;
    }
    
    .scheduling-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 20px;
        padding: 0;
    }
    
    .scheduling-card {
        min-width: 0;
        margin: 0;
        width: 100% !important;
        display: block !important;
    }
    
    .card-header {
        padding: 24px 16px;
    }
    
    .tidycal-container {
        padding: 16px;
    }
    
    .footer-content {
        padding: 0 16px;
    }
    
    .footer-disclaimer {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    /* Header simplificado */
    .nav-container {
        padding: 0 10px;
    }
    
    .nav-brand {
        font-size: 14px;
        gap: 5px;
    }
    
    .brand-text {
        display: none; /* Esconder texto em telas muito pequenas */
    }
    
    .brand-logo {
        width: 24px;
        height: 24px;
    }
    
    .health-icon {
        font-size: 18px;
    }
    
    /* Footer simplificado */
    .footer {
        padding: 15px 10px;
    }
    
    .footer-content {
        padding: 0 10px;
        gap: 5px;
    }
    
    .doctor-info p {
        font-size: 11px;
        line-height: 1.3;
    }
    
    .footer-disclaimer p {
        font-size: 10px;
    }
    
    /* Cards sem margem lateral */
    .hero-card,
    .welcome-card,
    .info-card,
    .scheduling-card,
    .doctor-info-card {
        border-radius: 0;
        margin: 0;
    }
    
    /* Grids simplificados */
    .scheduling-grid {
        grid-template-columns: 1fr;
    }
}

/* Animation Classes - Consolidated for Performance */
.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.slide-up {
    animation: slideUp 0.8s ease-out forwards;
}

.card-hover {
    transform: translateY(-8px) scale(1.02);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.card-hover-reset {
    transform: translateY(0) scale(1);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.navbar-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1) !important;
}

.navbar-top {
    background: rgba(255, 255, 255, 0.8) !important;
    box-shadow: none !important;
}

.hero-parallax {
    transform: translateY(var(--parallax-offset, 0px));
    transition: transform 0.1s linear;
}

.initial-hidden {
    opacity: 0;
    transform: translateY(30px);
}

/* Optimized keyframes with will-change for better performance */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes ripple {
    to {
        transform: scale(2);
        opacity: 0;
    }
}

/* Loading and Interactive Elements */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: var(--text-secondary);
    font-size: 14px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.ripple-effect {
    position: absolute;
    background: rgba(0, 122, 255, 0.3);
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
    z-index: 1;
}

/* Performance optimizations */
.hero-card, .welcome-card, .info-card, .doctor-info-card, .scheduling-card {
    will-change: opacity, transform;
}

.hero-card:hover, .welcome-card:hover, .info-card:hover, 
.doctor-info-card:hover, .scheduling-card:hover {
    will-change: transform;
}

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

/* Skip Links */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-blue);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    z-index: 9999;
    transition: top 0.3s ease;
    font-size: 14px;
}

.skip-link:focus {
    top: 6px;
    outline: var(--focus-ring);
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    z-index: 1001;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--shadow-medium);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-strong);
}

.theme-toggle:focus {
    outline: var(--focus-ring);
}

[data-theme="dark"] .theme-toggle {
    background: rgba(44, 44, 46, 0.9);
    border-color: rgba(44, 44, 46, 0.18);
}

.theme-toggle .theme-icon {
    transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
    transform: rotate(180deg);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    z-index: 1000;
    font-size: 24px;
    font-weight: bold;
    box-shadow: var(--shadow-strong);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 122, 255, 0.4);
}

.back-to-top:focus {
    outline: var(--focus-ring);
}

.back-to-top:active {
    transform: translateY(-1px) scale(1.05);
}

/* Skeleton Screens */
.skeleton-loader {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--border-radius);
    height: 300px;
    margin-bottom: 20px;
}

[data-theme="dark"] .skeleton-loader {
    background: linear-gradient(90deg, #2c2c2e 25%, #3a3a3c 50%, #2c2c2e 75%);
    background-size: 200% 100%;
}

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

/* Enhanced Focus Styles */
*:focus {
    outline: var(--focus-ring);
    outline-offset: 2px;
}

button:focus,
a:focus,
[tabindex]:focus {
    outline: var(--focus-ring);
    outline-offset: 2px;
}

.info-card:focus,
.scheduling-card:focus,
.doctor-info-card:focus {
    outline: var(--focus-ring);
    outline-offset: 4px;
    transform: translateY(-2px);
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .back-to-top {
        transition: opacity 0.3s ease;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #000000;
        --text-secondary: #333333;
        --primary-blue: #0000FF;
        --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.3);
        --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.4);
        --shadow-strong: 0 8px 24px rgba(0, 0, 0, 0.6);
    }
    
    .info-card,
    .scheduling-card,
    .hero-card,
    .welcome-card,
    .doctor-info-card {
        border: 2px solid var(--text-primary);
    }
}

/* Progress Indicators */
.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: var(--primary-blue);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Error States */
.error-state {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid var(--error-color);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    color: var(--error-color);
}

.success-state {
    background: rgba(52, 199, 89, 0.1);
    border: 1px solid var(--success-color);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    color: var(--success-color);
}

/* Enhanced Hover Effects */
.info-card:hover,
.scheduling-card:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-strong);
}

[data-theme="dark"] .info-card:hover,
[data-theme="dark"] .scheduling-card:hover {
    background: rgba(44, 44, 46, 0.95);
}

/* Advanced Touch Gestures */
/* Removed swipe container CSS */

/* Pull-to-Refresh Indicator */
.pull-refresh-indicator {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-60px);
    background: var(--white);
    border: 1px solid rgba(0, 122, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    opacity: 0;
    transition: var(--transition);
    box-shadow: var(--shadow-medium);
    backdrop-filter: blur(20px);
}

.pull-refresh-indicator.ready {
    background: var(--primary-blue);
    color: white;
}

.refresh-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 122, 255, 0.3);
    border-top: 2px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.pull-refresh-indicator.ready .refresh-spinner {
    border-color: rgba(255, 255, 255, 0.3);
    border-top-color: white;
}

.pull-refresh-indicator p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

/* Touch Ripple Effect */
.touch-ripple {
    position: absolute;
    background: rgba(0, 122, 255, 0.2);
    border-radius: 50%;
    transform: scale(0);
    animation: touch-ripple 0.6s ease-out;
    pointer-events: none;
    z-index: 1;
}

@keyframes touch-ripple {
    to {
        transform: scale(2);
        opacity: 0;
    }
}

.touch-active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* Vibration Support for Mobile */
@media (hover: none) and (pointer: coarse) {
    .info-card:active,
    .scheduling-card:active,
    .back-to-top:active,
    .theme-toggle:active {
        transform: scale(0.98);
    }
    
    /* Enhanced mobile interactions */
    .info-card,
    .scheduling-card {
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
    }
}

/* Font display optimization */
@font-face {
    font-family: 'Inter';
    font-display: swap;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Styling */
::selection {
    background: var(--primary-blue);
    color: white;
}

::-moz-selection {
    background: var(--primary-blue);
    color: white;
}

/* Simplified Responsive - No complex rules */

/* Validation Overlay */
.validation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: var(--border-radius);
}

.validation-content {
    text-align: center;
    max-width: 400px;
    padding: 40px 30px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(0, 122, 255, 0.1);
}

.validation-content h4 {
    color: var(--text-primary);
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 600;
}

.validation-content p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

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

.validation-form label {
    display: block;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 8px;
    text-align: left;
}

.employee-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E5E7EB;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
    background: var(--white);
    margin-bottom: 16px;
}

.employee-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: var(--focus-ring);
}

.validate-btn {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.validate-btn:hover {
    background: #0056D3;
    transform: translateY(-2px);
}

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

.validation-error {
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    border-radius: var(--border-radius);
    padding: 12px;
    margin-top: 16px;
}

.validation-error p {
    color: #DC2626;
    margin: 0;
    font-size: 14px;
}

.tidycal-hidden {
    display: none;
}

/* Dark theme support for validation */
[data-theme="dark"] .validation-overlay {
    background: rgba(28, 28, 30, 0.95);
}

[data-theme="dark"] .validation-content {
    background: var(--gray-800);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .employee-input {
    background: var(--gray-700);
    border-color: var(--gray-600);
    color: white;
}

[data-theme="dark"] .employee-input:focus {
    border-color: var(--primary-blue);
}

[data-theme="dark"] .validation-error {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.3);
}

/* Print styles for accessibility */
@media print {
    .theme-toggle,
    .back-to-top,
    .pull-refresh-indicator,
    .validation-overlay {
        display: none !important;
    }
    
    .hero-card,
    .welcome-card,
    .info-card,
    .doctor-info-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .scheduling-card {
        display: none; /* Hide interactive elements in print */
    }
}