/* Vigil - App Theme Web Design */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* App Theme Colors */
    --primary-gold: #fbbf24;
    --primary-brown: #92400e;
    --primary-orange: #ea580c;
    --background-dark: #1c1917;
    --background-warm: #292524;
    --glass-background: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.12);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.9);
    --text-muted: rgba(255, 255, 255, 0.7);
    --accent-green: #10b981;
    --mobile-width: 430px;
    
    /* Spiritual accent colors */
    --halo-gold: #fde047;
    --candle-orange: #fb923c;
    --stained-blue: #3b82f6;
    --stained-purple: #8b5cf6;
}

html {
    background: var(--background-dark);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Mobile Container with Church Background */
.mobile-wrapper {
    max-width: var(--mobile-width);
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    background-image: url('../images/home-background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Warm overlay for better readability */
.mobile-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        rgba(28, 25, 23, 0.6) 0%, 
        rgba(41, 37, 36, 0.8) 50%,
        rgba(28, 25, 23, 0.9) 100%);
    pointer-events: none;
}

/* Page-specific backgrounds */
.mobile-wrapper.privacy-page,
.mobile-wrapper.terms-page {
    background-image: url('../images/setting-background.png');
}

.mobile-wrapper.contact-page,
.mobile-wrapper.donate-page {
    background-image: url('../images/prayer-background.png');
}

/* Desktop responsive design - Full width */
@media (min-width: 768px) {
    body {
        background: var(--background-dark);
        padding: 0;
    }
    
    .mobile-wrapper {
        max-width: 100% !important;
        width: 100%;
        margin: 0;
        box-shadow: none;
        border-radius: 0;
        overflow: visible;
    }
    
    /* Desktop fade effect on sides */
    .mobile-wrapper::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(90deg, 
            rgba(28, 25, 23, 0.9) 0%, 
            rgba(28, 25, 23, 0.7) 15%,
            rgba(28, 25, 23, 0.3) 30%,
            rgba(28, 25, 23, 0.3) 70%,
            rgba(28, 25, 23, 0.7) 85%,
            rgba(28, 25, 23, 0.9) 100%);
        pointer-events: none;
        z-index: 1;
    }
    
    /* Ensure content stays above fade */
    .container {
        position: relative;
        z-index: 2;
        max-width: 1200px;
        margin: 0 auto;
        padding: 2rem 4rem;
    }
    
    /* Desktop grid layouts */
    .glass-card {
        margin-bottom: 3rem;
    }
    
    /* Desktop feature grid */
    .feature-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }
    
    /* Desktop download buttons */
    .download-buttons {
        display: flex;
        justify-content: center;
        gap: 2rem;
        margin: 3rem 0;
    }
    
    .download-btn {
        display: inline-block;
        transition: all 0.3s ease;
    }
    
    .download-btn:hover {
        transform: translateY(-5px);
        filter: brightness(1.1);
    }
    
    .download-btn img {
        height: 60px;
        width: auto;
    }
}

/* Container */
.container {
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

/* Frosted Glass Cards - App Theme */
.glass-card {
    background: var(--glass-background);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Subtle glow effect for spiritual elements */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(251, 191, 36, 0.05) 0%, 
        transparent 50%,
        rgba(139, 92, 246, 0.05) 100%);
    pointer-events: none;
    border-radius: 20px;
}

/* Header with App Logo - New Layout */
.header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
}

.logo {
    width: 80px;
    height: 80px;
    background-image: url('../images/logo.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(251, 191, 36, 0.3);
    position: relative;
    flex-shrink: 0;
}

.logo::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--halo-gold), var(--candle-orange));
    border-radius: 22px;
    z-index: -1;
    opacity: 0.6;
}

.header-text {
    flex: 1;
}

.app-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.app-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 0;
}

/* Language Switcher */
.language-switcher {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.flag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.flag-btn:hover {
    transform: scale(1.1);
}

.flag-btn.active {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid var(--primary-gold);
}

/* Flag Images */
.flag-img {
    width: 32px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.flag-btn:hover .flag-img {
    transform: scale(1.1);
    border-color: var(--primary-gold);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.flag-btn.active .flag-img {
    border-color: var(--primary-gold);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

/* Screenshot Carousel */
.screenshot-carousel {
    margin: 2rem 0;
    position: relative;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: var(--glass-background);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
}

.carousel-slide {
    display: none;
    text-align: center;
    padding: 2rem;
}

.carousel-slide.active {
    display: block;
}

.screenshot-img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
}

.screenshot-caption {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

.carousel-dots {
    text-align: center;
    margin-top: 1rem;
}

.dot {
    height: 12px;
    width: 12px;
    margin: 0 8px;
    background-color: var(--glass-border);
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active,
.dot:hover {
    background-color: var(--primary-gold);
    transform: scale(1.2);
}

/* Coming Soon Info */
.coming-soon-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

/* Typography - App Theme */
h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

/* Buttons - App Theme */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 100%);
    border-radius: 15px;
    pointer-events: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-gold), var(--primary-orange));
    color: var(--background-dark);
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(251, 191, 36, 0.4);
}

.btn-secondary {
    background: var(--glass-background);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* Feature Cards - App Theme */
.feature-card {
    background: var(--glass-background);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    margin: 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.feature-card.bible {
    border-color: rgba(251, 191, 36, 0.3);
}

.feature-card.bible::before {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), transparent);
}

.feature-card.rosary {
    border-color: rgba(139, 92, 246, 0.3);
}

.feature-card.rosary::before {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), transparent);
}

.feature-card.prayers {
    border-color: rgba(16, 185, 129, 0.3);
}

.feature-card.prayers::before {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), transparent);
}

.feature-card.multilingual {
    border-color: rgba(59, 130, 246, 0.3);
}

.feature-card.multilingual::before {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), transparent);
}

/* Form Elements - App Theme */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    background: var(--glass-background);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

/* Subscription form styles - Desktop */
.subscription-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    width: 100%;
}

.subscription-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    width: 100%;
    max-width: 400px;
}

.subscription-form .form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.subscription-form .form-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.subscription-form .form-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

.subscription-form .btn {
    min-width: 150px;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-color), #ffb300);
    color: var(--text-dark);
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    margin-top: 0.5rem;
}

.subscription-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.3);
}

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

.subscription-note {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    margin-top: 0.5rem;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Navigation Back Button */
.nav-back {
    position: fixed;
    top: 2rem;
    left: 1rem;
    background: var(--glass-background);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 100;
}

.nav-back:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* Footer - App Theme */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer a {
    color: var(--primary-gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--primary-orange);
}

/* Donation Grid - App Theme */
.donation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

/* Force 2 columns on mobile */
@media (max-width: 768px) {
    .donation-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem;
        margin: 1.5rem 0;
    }
}

/* Mobile responsive - 2 squares per row */
@media (max-width: 768px) {
    .donation-option {
        padding: 0.5rem 0.25rem !important;
        aspect-ratio: 1 !important;
        min-height: 80px;
    }
    
    .donation-amount {
        font-size: 1rem !important;
        margin-bottom: 0.25rem;
    }
    
    .donation-label {
        font-size: 0.65rem !important;
        line-height: 1.2;
    }
    
    .custom-donation {
        padding: 0.5rem 0.25rem !important;
        aspect-ratio: 1 !important;
        min-height: 80px;
    }
    
    .custom-input {
        font-size: 0.9rem !important;
        padding: 0.25rem;
    }
    
    /* Smaller screenshots on mobile */
    .screenshot-carousel {
        margin: 1.5rem 0;
    }
    
    .carousel-slide {
        padding: 1rem;
    }
    
    .screenshot-img {
        max-width: 80%;
        height: auto;
    }
    
    .screenshot-caption {
        font-size: 0.875rem;
        display: none;
    }
    
    /* Subscription form styles */
    .subscription-form {
        margin: 1.5rem 0;
    }
    
    .subscription-form .form-group {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        margin-bottom: 1rem;
        align-items: center;
    }
    
    .subscription-form .form-input {
        width: 100%;
        max-width: 300px;
        margin-bottom: 0;
    }
    
    .subscription-form .btn {
        white-space: nowrap;
        min-width: 150px;
        margin: 0;
        display: block;
    }
    
    .subscription-note {
        font-size: 0.875rem;
        color: var(--text-muted);
        margin: 0;
        text-align: center;
    }
}

.donation-option {
    background: var(--glass-background);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.donation-option:hover {
    border-color: var(--primary-gold);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(251, 191, 36, 0.2);
}

.donation-option.selected {
    border-color: var(--primary-gold);
    background: rgba(251, 191, 36, 0.1);
}

.donation-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.donation-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* .custom-donation styling is now handled in the HTML file */

.custom-input {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    display: block;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    background: var(--glass-background);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 1rem;
    color: var(--text-primary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.custom-input:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1rem;
    }
    
    .glass-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .app-title {
        font-size: 2rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .donation-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    /* Mobile header layout */
    .header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .logo {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem 0.5rem;
    }
    
    .glass-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .app-title {
        font-size: 1.8rem;
    }
    
    .donation-grid {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .glass-card {
        background: white;
        border: 1px solid #ccc;
        box-shadow: none;
    }
    
    .nav-back {
        display: none;
    }
}