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

html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #1a1a2e;
    color: #fff;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Scroll Container */
.scroll-container {
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
}

/* Base Slide Styles */
.slide {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    padding: 2rem;
    overflow: hidden;
}

.slide-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    width: 100%;
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

.slide-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Typography */
.title-large {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(3rem, 12vw, 6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: clamp(1rem, 4vw, 1.5rem);
    font-weight: 300;
    opacity: 0.9;
    letter-spacing: 0.05em;
}

/* Scripture Slides */
.scripture-container {
    margin-bottom: 2rem;
}

.scripture-text {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.4rem, 5vw, 2.2rem);
    font-weight: 400;
    line-height: 1.5;
    font-style: italic;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.scripture-ref {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.8;
}

.reflection {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.reflection p {
    font-size: clamp(1rem, 3.5vw, 1.25rem);
    font-weight: 300;
    opacity: 0.9;
    line-height: 1.7;
}

/* Transition Slides */
.slide-transition .statement {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 600;
    line-height: 1.2;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Gospel Slides */
.gospel-text {
    text-align: left;
}

.gospel-text h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 7vw, 3rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.gospel-text p {
    font-size: clamp(1.1rem, 3.5vw, 1.4rem);
    font-weight: 300;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.gospel-text .highlight {
    font-weight: 500;
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border-left: 4px solid rgba(255, 255, 255, 0.5);
}

.gospel-text em {
    font-style: italic;
    font-family: 'Playfair Display', Georgia, serif;
}

/* Light theme adjustments */
[data-theme="light"] .slide-content {
    color: #1a1a2e;
}

[data-theme="light"] .scripture-text,
[data-theme="light"] .reflection p {
    text-shadow: none;
}

[data-theme="light"] .reflection {
    border-top-color: rgba(0, 0, 0, 0.1);
}

/* Response Slide */
.slide-response h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    margin-bottom: 2rem;
}

.response-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.response-btn {
    padding: 1.25rem 2rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.response-btn:hover,
.response-btn:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

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

.response-btn.selected {
    background: rgba(255, 255, 255, 0.3);
    border-color: #fff;
}

/* Chat Section */
.slide-chat {
    padding: 1rem;
}

.slide-chat .slide-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.chat-container {
    width: 100%;
    max-width: 500px;
    height: 85vh;
    height: 85dvh;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.chat-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-header h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.chat-header p {
    font-size: 0.9rem;
    opacity: 0.7;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-message {
    max-width: 85%;
    padding: 1rem 1.25rem;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    animation: messageIn 0.3s ease-out;
}

.chat-message.bot {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 4px;
}

.chat-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom-right-radius: 4px;
}

.chat-message.bot.typing {
    display: flex;
    gap: 4px;
    padding: 1rem 1.5rem;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

.chat-input-container {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

#chatInput {
    flex: 1;
    padding: 1rem 1.25rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    outline: none;
    transition: all 0.3s ease;
}

#chatInput::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#chatInput:focus {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

#sendBtn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

#sendBtn svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

#sendBtn:hover {
    transform: scale(1.05);
}

#sendBtn:active {
    transform: scale(0.95);
}

/* Quick Replies */
.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.quick-reply {
    padding: 0.5rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #fff;
    background: rgba(102, 126, 234, 0.3);
    border: 1px solid rgba(102, 126, 234, 0.5);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-reply:hover {
    background: rgba(102, 126, 234, 0.5);
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 100;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2, #f39c12);
    background-size: 200% 100%;
    width: 0%;
    transition: width 0.3s ease;
    animation: gradientMove 3s ease infinite;
}

/* Slide Indicators */
.slide-indicators {
    position: fixed;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator-dot.active {
    background: #fff;
    transform: scale(1.3);
}

.indicator-dot:hover {
    background: rgba(255, 255, 255, 0.6);
}

/* Hero Container */
.hero-container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    width: 100%;
    padding: 2rem;
}

.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Scroll Hint */
.scroll-hint {
    position: absolute;
    bottom: 2.5rem;
    left: 0;
    right: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.scroll-hint span {
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.7;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid rgba(255, 255, 255, 0.7);
    border-bottom: 2px solid rgba(255, 255, 255, 0.7);
    transform: rotate(45deg);
    animation: bounce 2s ease-in-out infinite;
}

/* Nature Background */
.nature-bg {
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.5) 100%),
        linear-gradient(135deg, #134e5e 0%, #71b280 100%);
}

/* Contact Section */
.contact-container {
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.contact-container h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.contact-subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input {
    padding: 1rem 1.25rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
}

.contact-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.contact-form input:focus {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

.contact-submit {
    padding: 1rem 2rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a2e;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.contact-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.contact-submit:active {
    transform: translateY(0);
}

.contact-privacy {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: 1.5rem;
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: rotate(45deg) translateY(0);
    }
    40% {
        transform: rotate(45deg) translateY(-10px);
    }
    60% {
        transform: rotate(45deg) translateY(-5px);
    }
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

@keyframes typingBounce {
    0%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-6px);
    }
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .slide {
        padding: 1.5rem;
    }

    .slide-indicators {
        right: 0.5rem;
    }

    .indicator-dot {
        width: 6px;
        height: 6px;
    }

    .chat-container {
        height: 90vh;
        height: 90dvh;
        border-radius: 16px;
    }

    .response-btn {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
    }
}

@media (min-width: 768px) {
    .slide {
        padding: 3rem;
    }

    .gospel-text {
        text-align: center;
    }

    .response-options {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .response-btn {
        flex: 0 1 auto;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .scroll-container {
        scroll-behavior: auto;
    }

    .slide-content {
        animation: none;
    }

    .scroll-arrow {
        animation: none;
    }

    .progress-fill {
        animation: none;
    }

    .typing-dot {
        animation: none;
    }
}

/* Dark mode consistency */
@media (prefers-color-scheme: dark) {
    body {
        background: #0a0a0f;
    }
}

/* Touch improvements */
@media (hover: none) and (pointer: coarse) {
    .response-btn:hover {
        transform: none;
        background: rgba(255, 255, 255, 0.15);
    }

    .response-btn:active {
        background: rgba(255, 255, 255, 0.25);
        transform: scale(0.98);
    }
}
