
        @import url('https://fonts.googleapis.com/css2?family=Verdana:wght@400;700&family=Georgia:wght@400;700&display=swap');
        
        :root {
            --primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            --secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
            --accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
            --gold: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
            --success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
            --text-dark: #1a1a1a;
            --text-light: #ffffff;
            --text-muted: #64748b;
            --surface: #ffffff;
            --surface-elevated: #f8fafc;
            --border: rgba(255,255,255,0.1);
            --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
            --shadow-md: 0 4px 24px rgba(0,0,0,0.08);
            --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
            --shadow-xl: 0 16px 48px rgba(0,0,0,0.16);
            --border-radius: 24px;
            --border-radius-sm: 16px;
        }

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

        body {
            font-family: 'Verdana', Arial, sans-serif;
            line-height: 1.7;
            color: var(--text-dark);
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            overflow-x: hidden;
        }

        /* Enhanced Scrollbar */
        ::-webkit-scrollbar {
            width: 6px;
        }
        
        ::-webkit-scrollbar-track {
            background: transparent;
        }
        
        ::-webkit-scrollbar-thumb {
            background: linear-gradient(135deg, #667eea, #764ba2);
            border-radius: 10px;
        }

        .container {
            max-width: 100%;
            margin: 0 auto;
            background: var(--surface);
            min-height: 100vh;
            position: relative;
            overflow: hidden;
        }

        /* Fixed Header - Always Visible */
        header {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1000;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(20px) saturate(180%);
            padding: 24px;
            box-shadow: var(--shadow-xl);
            border-bottom: 1px solid rgba(255, 255, 255, 0.2);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            min-height: 120px;
        }

        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 16px;
            min-height: 60px;
        }

        .logo {
            font-family: 'Georgia', serif;
            font-size: 22px;
            font-weight: 700;
            background: var(--primary);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .logo i {
            font-size: 24px;
            background: var(--primary);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .nav-buttons {
            display: flex;
            gap: 8px;
            align-items: flex-start;
            flex-wrap: wrap;
            justify-content: flex-end;
        }

        .nav-btn {
            background: transparent;
            color: var(--text-muted);
            border: none;
            padding: 16px 24px;
            border-radius: 20px;
            cursor: pointer;
            font-size: 16px;
            font-weight: 700;
            font-family: 'Verdana', Arial, sans-serif;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            position: relative;
            overflow: hidden;
        }

        .nav-btn:before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: var(--accent);
            transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: -1;
            border-radius: 20px;
        }

        .nav-btn:hover:before {
            left: 0;
        }

        .nav-btn:hover {
            color: white;
            transform: translateY(-2px);
        }

        .nav-btn.active {
            background: var(--primary);
            color: white;
            box-shadow: var(--shadow-md);
        }

        .donate-btn {
            background: var(--success) !important;
            color: white !important;
            font-weight: 600;
            box-shadow: var(--shadow-md);
            animation: pulse 3s infinite;
        }

        .donate-btn:before {
            background: linear-gradient(135deg, #0d7377, #2dd4bf) !important;
        }

        .survey-btn {
            background: linear-gradient(135deg, #f59e0b, #d97706) !important;
            color: white !important;
            font-weight: 600;
            box-shadow: var(--shadow-md);
        }

        .survey-btn:before {
            background: linear-gradient(135deg, #d97706, #b45309) !important;
        }

        @keyframes pulse {
            0%, 100% { 
                box-shadow: var(--shadow-md), 0 0 0 0 rgba(17, 153, 142, 0.4); 
            }
            50% { 
                box-shadow: var(--shadow-lg), 0 0 0 8px rgba(17, 153, 142, 0); 
            }
        }

        /* Main Content */
        main {
            padding: 160px 20px 40px;
            position: relative;
        }

        .page {
            display: none;
            opacity: 0;
            transform: translateY(30px);
            transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .page.active {
            display: block;
            opacity: 1;
            transform: translateY(0);
        }

        /* Hero Section */
        .date-header {
            text-align: center;
            margin-bottom: 40px;
            padding: 40px 30px;
            background: var(--primary);
            color: white;
            border-radius: var(--border-radius);
            box-shadow: var(--shadow-xl);
            position: relative;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .date-header:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-xl), 0 0 0 4px rgba(102, 126, 234, 0.3);
        }

        .date-header:before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
            animation: shimmer 6s linear infinite;
        }

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

        .date-header h1 {
            font-family: 'Georgia', serif;
            font-size: 32px;
            font-weight: 700;
            margin-bottom: 12px;
            position: relative;
            z-index: 1;
        }

        .date-header p {
            font-size: 16px;
            opacity: 0.9;
            position: relative;
            z-index: 1;
        }

        /* Calendar Styles */
        .calendar-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(10px);
            z-index: 2000;
            display: none;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .calendar-overlay.show {
            display: flex;
            opacity: 1;
        }

        .calendar-container {
            background: var(--surface);
            border-radius: var(--border-radius);
            box-shadow: var(--shadow-xl);
            padding: 32px;
            max-width: 400px;
            width: 90%;
            transform: scale(0.9);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .calendar-overlay.show .calendar-container {
            transform: scale(1);
        }

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

        .calendar-title {
            font-size: 18px;
            font-weight: 600;
            color: var(--text-dark);
            margin: 0;
        }

        .calendar-nav {
            background: transparent;
            border: none;
            color: var(--text-muted);
            font-size: 20px;
            cursor: pointer;
            padding: 8px;
            border-radius: 50%;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .calendar-nav:hover {
            background: var(--accent);
            color: white;
            transform: scale(1.1);
        }

        .calendar-nav:disabled {
            opacity: 0.3;
            cursor: not-allowed;
        }

        .calendar-nav:disabled:hover {
            background: transparent;
            color: var(--text-muted);
            transform: none;
        }

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

        .calendar-weekday {
            text-align: center;
            font-size: 12px;
            font-weight: 600;
            color: var(--text-muted);
            padding: 8px 4px;
        }

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

        .calendar-day {
            aspect-ratio: 1;
            border: none;
            background: transparent;
            border-radius: 12px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            color: var(--text-dark);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .calendar-day:hover {
            background: var(--accent);
            color: white;
            transform: scale(1.1);
        }

        .calendar-day.other-month {
            color: var(--text-muted);
            opacity: 0.4;
        }

        .calendar-day.today {
            background: var(--success);
            color: white;
            font-weight: 700;
        }

        .calendar-day.selected {
            background: var(--primary);
            color: white;
            font-weight: 700;
        }

        .calendar-day.future {
            opacity: 0.3;
            cursor: not-allowed;
        }

        .calendar-day.future:hover {
            background: transparent;
            color: var(--text-muted);
            transform: none;
        }

        .calendar-actions {
            display: flex;
            gap: 12px;
            justify-content: flex-end;
        }

        .calendar-btn {
            padding: 12px 24px;
            border: none;
            border-radius: var(--border-radius-sm);
            cursor: pointer;
            font-size: 14px;
            font-weight: 600;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

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

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

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

        .calendar-btn.primary:hover {
            background: linear-gradient(135deg, #5a6fd8, #6c5b9f);
        }

        .calendar-btn.secondary:hover {
            background: var(--surface-elevated);
            color: var(--text-dark);
        }

        /* Reading Cards */
        .reading {
            background: var(--surface);
            margin: 24px 0;
            padding: 32px;
            border-radius: var(--border-radius);
            box-shadow: var(--shadow-lg);
            border: 1px solid rgba(255,255,255,0.1);
            position: relative;
            overflow: hidden;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .reading:hover {
            transform: translateY(-8px);
            box-shadow: var(--shadow-xl);
        }

        .reading:before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 4px;
            height: 100%;
            background: var(--accent);
            transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .reading:hover:before {
            width: 8px;
        }

        .reading h2 {
            color: var(--text-dark);
            margin-bottom: 16px;
            font-size: 20px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .reading-icon {
            width: 36px;
            height: 36px;
            background: var(--accent);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 16px;
            font-weight: 600;
            box-shadow: var(--shadow-sm);
        }

        .citation {
            font-style: italic;
            color: var(--text-muted);
            margin-bottom: 20px;
            font-size: 14px;
            font-weight: 500;
        }

        .text {
            line-height: 1.8;
            font-size: 16px;
            color: var(--text-dark);
            margin-bottom: 16px;
        }

        /* Special Reading Types */
        .responsorial {
            background: linear-gradient(135deg, #f0fdf4, #dcfce7);
            border-left-color: #22c55e;
        }

        .responsorial .reading-icon {
            background: var(--success);
        }

        .responsorial .antiphon {
            font-weight: 600;
            display: block;
            margin-top: 16px;
            color: #16a34a;
        }

        .gospel {
            background: linear-gradient(135deg, #fffbeb, #fef3c7);
        }

        .gospel .reading-icon {
            background: var(--gold);
        }

        .gospel-acclamation {
            background: linear-gradient(135deg, #f0fdf4, #dcfce7);
        }

        .gospel-acclamation .reading-icon {
            background: var(--success);
        }

        .feast {
            background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
        }

        .feast .reading-icon {
            background: linear-gradient(135deg, #8b5cf6, #7c3aed);
        }

        /* Enhanced Sections */
        .about-section, .welcome-section, .schedule-section, 
        .social-section, .contact-section, .survey-section {
            background: var(--surface);
            padding: 40px 32px;
            border-radius: var(--border-radius);
            margin-bottom: 32px;
            box-shadow: var(--shadow-lg);
            border: 1px solid rgba(255,255,255,0.1);
            position: relative;
            overflow: hidden;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .about-section:hover, .schedule-section:hover, .survey-section:hover {
            transform: translateY(-4px);
            box-shadow: var(--shadow-xl);
        }

        .welcome-section {
            background: var(--primary);
            color: white;
            text-align: center;
        }

        .welcome-section:before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
            animation: shimmer 8s linear infinite;
        }

        .welcome-section h1 {
            font-family: 'Georgia', serif;
            font-size: 36px;
            margin-bottom: 16px;
            position: relative;
            z-index: 1;
        }

        .welcome-section .subtitle {
            font-size: 18px;
            opacity: 0.9;
            margin-bottom: 32px;
            font-style: italic;
            position: relative;
            z-index: 1;
        }

        .schedule-section {
            background: var(--success);
            color: white;
        }

        .social-section {
            background: linear-gradient(135deg, #3b82f6, #1d4ed8);
            color: white;
            text-align: center;
        }

        .contact-section {
            background: linear-gradient(135deg, #dc2626, #b91c1c);
            color: white;
            text-align: center;
        }

        .section-title {
            font-family: 'Georgia', serif;
            font-size: 26px;
            font-weight: 700;
            margin-bottom: 24px;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .section-title i {
            font-size: 28px;
        }

        /* Enhanced Info Items */
        .info-item {
            padding: 32px;
            background: rgba(255,255,255,0.95);
            border-radius: var(--border-radius-sm);
            box-shadow: var(--shadow-md);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
            border: 1px solid rgba(255,255,255,0.2);
        }

        .info-item:hover {
            transform: translateY(-6px);
            box-shadow: var(--shadow-xl);
        }

        .info-item:before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 4px;
            height: 100%;
            background: var(--accent);
            transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .info-item:hover:before {
            width: 8px;
        }

        .info-item strong {
            color: var(--text-dark);
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 16px;
            font-size: 18px;
            font-weight: 600;
        }

        .info-item strong i {
            color: #667eea;
            font-size: 20px;
        }

        .schedule-details {
            line-height: 1.8;
            font-size: 16px;
            color: var(--text-dark);
        }

        /* Enhanced Facebook Link */
        .facebook-link {
            display: inline-flex;
            align-items: center;
            gap: 12px;
            background: rgba(255, 255, 255, 0.2);
            color: white;
            text-decoration: none;
            padding: 18px 32px;
            border-radius: 30px;
            font-size: 16px;
            font-weight: 600;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            backdrop-filter: blur(10px);
            border: 2px solid rgba(255, 255, 255, 0.3);
            box-shadow: var(--shadow-md);
            position: relative;
            overflow: hidden;
        }

        .facebook-link:before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.2);
            transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .facebook-link:hover:before {
            left: 0;
        }

        .facebook-link:hover {
            transform: translateY(-4px);
            box-shadow: var(--shadow-lg);
            color: white;
            text-decoration: none;
        }

        .facebook-icon {
            font-size: 20px;
        }

        /* Social Features Grid */
        .social-features {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 16px;
            margin-top: 32px;
        }

        .social-feature {
            display: flex;
            align-items: center;
            gap: 12px;
            background: rgba(255, 255, 255, 0.15);
            padding: 20px;
            border-radius: var(--border-radius-sm);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .social-feature:hover {
            background: rgba(255, 255, 255, 0.25);
            transform: translateY(-2px);
        }

        .social-feature-icon {
            font-size: 18px;
            min-width: 24px;
            text-align: center;
        }

        .social-feature-text {
            font-weight: 500;
            font-size: 14px;
        }

        /* Enhanced Prayer Categories */
        .prayer-category {
            background: var(--surface);
            margin: 24px 0;
            border-radius: var(--border-radius);
            box-shadow: var(--shadow-lg);
            overflow: hidden;
            border: 1px solid rgba(255,255,255,0.1);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .prayer-category:hover {
            box-shadow: var(--shadow-xl);
        }

        .prayer-header {
            background: var(--primary);
            color: white;
            padding: 24px 32px;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
            scroll-margin-top: 120px;
        }

        .prayer-header:before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
            transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .prayer-header:hover:before {
            left: 100%;
        }

        .prayer-header h3 {
            font-size: 18px;
            font-weight: 600;
            margin: 0;
            display: flex;
            align-items: center;
            gap: 12px;
            position: relative;
            z-index: 1;
        }

        .prayer-toggle {
            font-size: 16px;
            transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            z-index: 1;
        }

        .prayer-category.expanded .prayer-toggle {
            transform: rotate(180deg);
        }

        .prayer-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.4s ease-in-out;
            will-change: max-height;
        }

        .prayer-category.expanded .prayer-content {
            max-height: 3000px;
        }

        .prayers-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 24px;
            margin: 32px;
        }

        .prayer-card {
            background: var(--surface);
            border-radius: var(--border-radius-sm);
            box-shadow: var(--shadow-md);
            border: 1px solid rgba(255,255,255,0.1);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            cursor: pointer;
            overflow: hidden;
            position: relative;
        }

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

        .prayer-card:before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 4px;
            height: 100%;
            background: var(--accent);
            transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .prayer-card:hover:before {
            width: 8px;
        }

        .prayer-card-header {
            padding: 24px 24px 16px;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .prayer-card-header i {
            font-size: 24px;
            color: #667eea;
            min-width: 32px;
            text-align: center;
        }

        .prayer-card-header h3 {
            color: var(--text-dark);
            font-size: 18px;
            font-weight: 700;
            font-family: 'Georgia', serif;
            margin: 0;
        }

        .prayer-preview {
            padding: 0 24px 24px;
            color: var(--text-muted);
            font-size: 14px;
            line-height: 1.5;
            margin: 0;
        }

        /* INLINE PRAYER CONTENT STYLES */
        .prayer-inline-content {
            max-height: 0;
            overflow: hidden;
            transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
            background: linear-gradient(135deg, #f8fafc, #f1f5f9);
            border-top: 1px solid rgba(0,0,0,0.05);
            opacity: 0;
            padding: 0;
            visibility: hidden;
        }

        .prayer-card.expanded .prayer-inline-content {
            max-height: 2000px;
            padding: 24px;
            opacity: 1;
            visibility: visible;
        }

        .prayer-card .prayer-inline-content .prayer-section {
            margin-bottom: 24px;
            padding-bottom: 16px;
            border-bottom: 1px solid rgba(0,0,0,0.1);
            line-height: 1.8;
            font-size: 16px;
            color: var(--text-dark);
        }

        .prayer-card .prayer-inline-content .prayer-section:last-child {
            border-bottom: none;
            margin-bottom: 0;
        }

        .prayer-card .prayer-inline-content .prayer-latin {
            display: none;
        }

        .prayer-card .prayer-inline-content .prayer-instruction {
            color: #e74c3c;
            font-style: italic;
            margin-bottom: 8px;
            font-size: 14px;
            font-weight: 500;
        }

        .prayer-card .prayer-inline-content .mystery-title {
            color: #8e44ad;
            font-weight: 700;
            margin: 20px 0 8px 0;
            font-size: 16px;
        }

        .prayer-card .prayer-inline-content strong {
            font-weight: 600;
        }

        /* Enhanced History Tabs */
        .history-tabs {
    display: flex;
    background: rgba(255,255,255,0.05);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    margin-bottom: 0;
    overflow-x: auto;
    backdrop-filter: blur(10px);
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.history-tab {
    padding: 16px 20px; /* Reduced from 20px 32px */
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 13px; /* Reduced from 14px */
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    min-width: 90px; /* Set minimum width */
    flex-shrink: 0; /* Prevent tabs from shrinking too much */
}
@media (max-width: 768px) {
    .history-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
    
    .history-tabs::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    
    .history-tab {
        padding: 14px 16px; /* Even smaller on mobile */
        font-size: 12px; /* Smaller font on mobile */
        min-width: 80px; /* Smaller minimum width */
        flex: 0 0 auto; /* Don't grow or shrink, maintain auto width */
    }
    
    /* Add scroll indicator */
    .history-tabs::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 20px;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1));
        pointer-events: none;
    }
}

        .history-tab:before {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 3px;
            background: var(--accent);
            transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .history-tab:hover:before, .history-tab.active:before {
            width: 100%;
        }

        .history-tab:hover {
            color: var(--text-dark);
            background: rgba(255,255,255,0.1);
        }

        .history-tab.active {
            background: var(--accent);
            color: white;
            box-shadow: var(--shadow-md);
        }

        .history-content {
            background: var(--surface);
            border-radius: 0 0 var(--border-radius) var(--border-radius);
            box-shadow: var(--shadow-xl);
            overflow: hidden;
            border: 1px solid rgba(255,255,255,0.1);
        }

        .history-panel {
            display: none;
            padding: 40px 32px;
            opacity: 0;
            transform: translateY(20px);
            transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .history-panel.active {
            display: block;
            opacity: 1;
            transform: translateY(0);
        }

        /* Enhanced Timeline */
        .timeline {
            position: relative;
            padding-left: 32px;
        }

        .timeline:before {
            content: '';
            position: absolute;
            left: 16px;
            top: 0;
            bottom: 0;
            width: 3px;
            background: var(--accent);
            border-radius: 2px;
        }

        .timeline-item {
            position: relative;
            margin-bottom: 40px;
            padding-left: 32px;
        }

        .timeline-item:before {
            content: '';
            position: absolute;
            left: -24px;
            top: 8px;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: var(--gold);
            border: 4px solid white;
            box-shadow: var(--shadow-md);
            z-index: 2;
        }

        .timeline-date {
            color: #667eea;
            font-weight: 600;
            font-size: 16px;
            margin-bottom: 8px;
        }

        .timeline-content {
            background: linear-gradient(135deg, #f8fafc, #f1f5f9);
            padding: 24px;
            border-radius: var(--border-radius-sm);
            border-left: 4px solid var(--accent);
            line-height: 1.7;
            box-shadow: var(--shadow-sm);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .timeline-content:hover {
            box-shadow: var(--shadow-md);
            transform: translateY(-2px);
        }

        .timeline-content h4 {
            color: var(--text-dark);
            margin-bottom: 12px;
            font-size: 18px;
            font-weight: 600;
        }

        /* Pastor Cards */
        .pastors-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 24px;
            margin: 32px 0;
        }

        .pastor-card {
            background: linear-gradient(135deg, #ffffff, #f8fafc);
            padding: 24px;
            border-radius: var(--border-radius-sm);
            box-shadow: var(--shadow-md);
            border: 1px solid rgba(255,255,255,0.2);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }

        .pastor-card:before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 4px;
            height: 100%;
            background: var(--success);
            transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

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

        .pastor-card:hover:before {
            width: 8px;
        }

        .pastor-name {
            color: var(--text-dark);
            font-weight: 600;
            font-size: 16px;
            margin-bottom: 8px;
        }

        .pastor-role {
            color: var(--text-muted);
            font-style: italic;
            margin-bottom: 8px;
            font-size: 14px;
        }

        .pastor-achievement {
            color: #16a34a;
            font-size: 14px;
            line-height: 1.5;
        }

        /* Survey Form Styles */
        .form-section {
            background: linear-gradient(135deg, #f8fafc, #f1f5f9);
            padding: 24px;
            border-radius: var(--border-radius-sm);
            margin-bottom: 24px;
            border: 1px solid rgba(255,255,255,0.2);
        }

        .form-section h3 {
            color: var(--text-dark);
            margin-bottom: 20px;
            font-size: 18px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .form-section h3 i {
            color: #667eea;
        }

        .rating-group {
            display: flex;
            gap: 16px;
            flex-wrap: wrap;
        }

        .rating-group label {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            padding: 8px 12px;
            border-radius: 8px;
            transition: background-color 0.3s;
        }

        .rating-group label:hover {
            background: rgba(102, 126, 234, 0.05);
        }

        input, select, textarea {
            font-family: inherit;
        }

        input:focus, select:focus, textarea:focus {
            outline: none;
            border-color: #667eea !important;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
        }

        /* Loading and Status */
        .loading {
            text-align: center;
            padding: 40px;
            color: var(--text-muted);
            font-size: 16px;
        }

        .success-notice, .fallback-notice {
            padding: 16px 24px;
            border-radius: var(--border-radius-sm);
            margin-bottom: 24px;
            text-align: center;
            font-weight: 500;
        }

        .success-notice {
            background: var(--success);
            color: white;
        }

        .fallback-notice {
            background: linear-gradient(135deg, #f97316, #ea580c);
            color: white;
        }

        /* Highlight Elements */
        .highlight-box {
            background: var(--primary);
            color: white;
            padding: 32px;
            border-radius: var(--border-radius);
            margin: 32px 0;
            text-align: center;
            box-shadow: var(--shadow-xl);
            position: relative;
            overflow: hidden;
        }

        .highlight-box:before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
            animation: shimmer 6s linear infinite;
        }

        .highlight-box h3 {
            margin-bottom: 16px;
            font-size: 20px;
            position: relative;
            z-index: 1;
        }

        .highlight-box p {
            position: relative;
            z-index: 1;
        }

        /* Focus states for accessibility */
        .nav-btn:focus, .facebook-link:focus, .prayer-header:focus, 
        .history-tab:focus, .prayer-card:focus, .calendar-day:focus,
        .calendar-nav:focus, .calendar-btn:focus {
            outline: 2px solid var(--accent);
            outline-offset: 2px;
        }

        /* Responsive Design */
        @media (max-width: 768px) {
            header {
                padding: 20px;
                min-height: 140px;
            }
            
            .header-content {
                flex-direction: column;
                gap: 16px;
                align-items: center;
                min-height: auto;
            }
            
            .nav-buttons {
                flex-wrap: wrap;
                justify-content: center;
                gap: 8px;
                width: 100%;
            }
            
            .nav-btn {
                font-size: 14px;
                padding: 14px 20px;
            }
            
            main {
                padding: 180px 16px 32px;
            }
            
            .date-header {
                padding: 32px 24px;
                margin-bottom: 32px;
            }
            
            .date-header h1 {
                font-size: 24px;
            }
            
            .reading {
                padding: 24px;
                margin: 20px 0;
            }
            
            .about-section, .welcome-section, .schedule-section, 
            .social-section, .contact-section, .survey-section {
                padding: 32px 24px;
                margin-bottom: 24px;
            }
            
            .welcome-section h1 {
                font-size: 28px;
            }
            
            .section-title {
                font-size: 20px;
            }
            
            .history-tabs {
                flex-wrap: nowrap;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }
            
            .history-tab {
                padding: 16px 24px;
                font-size: 12px;
                min-width: 120px;
            }
            
            .history-panel {
                padding: 32px 24px;
            }
            
            .timeline {
                padding-left: 24px;
            }
            
            .timeline-item {
                padding-left: 24px;
                margin-bottom: 32px;
            }
            
            .social-features {
                grid-template-columns: 1fr;
                gap: 12px;
            }
            
            .social-feature {
                padding: 16px;
            }
            
            .facebook-link {
                padding: 16px 24px;
                font-size: 14px;
            }
            
            .pastors-grid {
                grid-template-columns: 1fr;
                gap: 20px;
            }

            .prayers-grid {
                grid-template-columns: 1fr;
                margin: 24px 16px;
            }

            .prayer-card .prayer-inline-content {
                padding: 20px 16px;
            }

            .rating-group {
                flex-direction: column;
                gap: 8px;
            }

            .form-section {
                padding: 20px 16px;
            }
        }

        /* Micro-interactions */
        .nav-btn, .facebook-link, .prayer-header, .history-tab,
        .reading, .pastor-card, .timeline-content {
            transform: translateZ(0);
            backface-visibility: hidden;
            perspective: 1000px;
        }

        /* Enhanced animations */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .page.active * {
            animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
        }

        .page.active *:nth-child(1) { animation-delay: 0.1s; }
        .page.active *:nth-child(2) { animation-delay: 0.2s; }
        .page.active *:nth-child(3) { animation-delay: 0.3s; }
        
        /* Event Cards */
.event-card {
    background: rgba(255,255,255,0.95);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.2);
    cursor: pointer;
}

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

.event-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.event-card:hover:before {
    width: 8px;
}

.event-date-time {
    color: #667eea;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.event-title {
    color: var(--text-dark);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: 'Georgia', serif;
}

.event-description-preview {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Event Modal */
.event-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.event-modal.show {
    display: flex;
    opacity: 1;
}

.event-modal-content {
    background: var(--surface);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    padding: 32px;
    max-width: 500px;
    width: 90%;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.event-modal.show .event-modal-content {
    transform: scale(1);
}

.event-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s;
}

.event-modal-close:hover {
    color: var(--text-dark);
}

.event-modal-date-time {
    color: #667eea;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.event-modal-title {
    color: var(--text-dark);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    font-family: 'Georgia', serif;
}

.event-modal-description {
    color: var(--text-dark);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.add-to-calendar-btn {
    background: var(--success);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-to-calendar-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.event-learn-more {
    color: #667eea;
    font-size: 14px;
    font-weight: 500;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.8;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.event-card:hover .event-learn-more {
    opacity: 1;
    color: #5a6fd8;
}
/* Saint of the Day */
.saint-of-day {
    background: var(--surface);
    margin: 24px 0;
    padding: 32px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.saint-of-day:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.saint-of-day:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gold);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.saint-of-day:hover:before {
    width: 8px;
}

.saint-of-day h2 {
    color: var(--text-dark);
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.saint-icon {
    width: 36px;
    height: 36px;
    background: var(--gold);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.saint-title {
    font-family: 'Georgia', serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.3;
}

.saint-rank {
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
    text-transform: capitalize;
}

/* Saint color variations */
.saint-white {
    background: linear-gradient(135deg, #fefefe, #f8fafc);
}

.saint-white .saint-icon {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    color: var(--text-dark);
}

.saint-red {
    background: linear-gradient(135deg, #fef2f2, #fecaca);
}

.saint-red:before {
    background: #dc2626;
}

.saint-red .saint-icon {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.saint-default {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
}
/* Homily Generation Loading Modal */
.homily-loading-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    z-index: 3500;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.homily-loading-modal.show {
    display: flex;
    opacity: 1;
}

.homily-loading-content {
    background: var(--surface);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    padding: 40px 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255,255,255,0.1);
}

.homily-loading-modal.show .homily-loading-content {
    transform: scale(1);
}

.homily-loading-icon {
    font-size: 48px;
    margin-bottom: 20px;
    background: var(--primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s infinite;
}

.homily-loading-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    font-family: 'Georgia', serif;
}

.homily-loading-message {
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.homily-loading-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    color: #667eea;
    font-weight: 500;
    font-size: 14px;
}

.homily-loading-dots {
    display: inline-flex;
    gap: 4px;
}

.homily-loading-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #667eea;
    animation: loadingDots 1.4s ease-in-out infinite both;
}

.homily-loading-dot:nth-child(1) { animation-delay: -0.32s; }
.homily-loading-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes loadingDots {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}