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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #4a4a4a;
    background: linear-gradient(135deg, #f0f4f8 0%, #e6f2ff 100%);
    min-height: 100vh;
    direction: ltr;
}

/* RTL Support for Arabic */
body[dir="rtl"] {
    direction: rtl;
    font-family: 'Inter', 'Arial', sans-serif;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    box-shadow: 0 2px 15px rgba(135, 206, 235, 0.15);
    padding: 0;
    position: relative;
    z-index: 100;
}

/* Navigation Bar */
.main-nav {
    background: linear-gradient(135deg, #6ba3d0 0%, #87ceeb 100%);
    padding: 0;
    box-shadow: 0 2px 8px rgba(107, 163, 208, 0.2);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-list {
    list-style: none;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin: 0;
    padding: 0;
    gap: 0;
}

.nav-item {
    margin: 0;
}

.nav-link {
    display: block;
    padding: 1rem 2rem;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    position: relative;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.25);
    border-bottom-color: #d4af37;
}

.nav-link:focus {
    outline: 2px solid #d4af37;
    outline-offset: -2px;
}

.nav-link.active {
    background: rgba(212, 175, 55, 0.25);
    border-bottom-color: #d4af37;
    font-weight: 600;
}

.header-content {
    text-align: center;
    padding: 2rem 0;
}

.main-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: #4a5568;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(212, 175, 55, 0.15);
}

.main-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    color: #6b7a8f;
    margin-bottom: 2rem;
    font-weight: 400;
}

/* Language Selector */
.language-selector {
    display: flex;
    justify-content: center;
    align-items: center;
}

.language-select {
    padding: 0.5rem 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.95);
    font-size: 0.85rem;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 130px;
}

.language-select:hover {
    border-color: #d4af37;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
    background: #ffffff;
}

.language-select:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
    background: #ffffff;
}

/* Main Content */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
}

.verse-section {
    width: 100%;
}

.verse-container {
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(107, 163, 208, 0.12);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid #e6f2ff;
    position: relative;
    overflow: hidden;
}

.verse-display {
    margin-bottom: 2.5rem;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    background-image: var(--verse-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px;
    padding: 2rem;
    overflow: hidden;
}

.verse-display > * {
    position: relative;
    z-index: 2;
}

.verse-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: #4a5568;
    margin-bottom: 2rem;
    font-weight: 600;
}

.verse-text {
    font-family: 'Playfair Display', serif;
    font-size: 28px; /* 固定字体大小，避免clamp()函数 */
    line-height: 1.8;
    color: #ffffff;
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-style: italic;
    text-align: center;
    padding: 1rem;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
    background-color: rgba(107, 163, 208, 0.4); /* 使用天蓝色半透明背景 */
    border-radius: 8px;
    border-left: 4px solid #d4af37;
    /* 移除backdrop-filter，html2canvas不支持 */
}

.verse-reference {
    font-size: 16px; /* 固定字体大小 */
    color: #ffffff;
    font-weight: 500;
    font-style: normal;
    text-align: center;
    margin-top: 0.5rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    background-color: rgba(107, 163, 208, 0.5); /* 使用天蓝色半透明背景 */
    padding: 0.5rem 1rem;
    border-radius: 6px;
    display: inline-block;
}

.generate-btn {
    background: linear-gradient(135deg, #d4af37 0%, #b8953b 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 200px;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
    background: linear-gradient(135deg, #f4c542 0%, #d4af37 100%);
}

.generate-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

.generate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Button Container */
.button-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

/* Change Image Button */
.change-image-btn {
    background: linear-gradient(135deg, #b8a8d8 0%, #9b88c4 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(155, 136, 196, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    min-width: 180px;
}

.change-image-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(155, 136, 196, 0.45);
    background: linear-gradient(135deg, #c9b9e8 0%, #b8a8d8 100%);
}

.change-image-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(155, 136, 196, 0.3);
}

/* Save Button */
.save-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(40, 167, 69, 0.9);
    color: white;
    border: none;
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.save-btn:hover {
    background: rgba(40, 167, 69, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.4);
}

.save-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
}

.save-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.save-btn svg {
    width: 16px;
    height: 16px;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, rgba(107, 163, 208, 0.9) 0%, rgba(135, 206, 235, 0.85) 100%);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
}

.footer-text {
    font-size: 0.9rem;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #d4af37;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

/* Fade In Animation */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-container {
        flex-direction: column;
        padding: 0;
    }
    
    .nav-list {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-item {
        width: 100%;
        text-align: center;
    }
    
    .nav-link {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-link:hover,
    .nav-link.active {
        border-bottom-color: #d4af37;
    }
    
    .language-selector {
        width: 100%;
        justify-content: center;
        padding: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .language-select {
        min-width: 130px;
    }
    
    .verse-container {
        padding: 2rem 1.5rem;
        margin: 0 10px;
    }
    
    .main {
        padding: 1.5rem 0;
    }
}

@media (max-width: 480px) {
    .verse-container {
        padding: 1.5rem 1rem;
    }
    
    .verse-text {
        font-size: 20px; /* 小屏幕下的字体大小 */
        padding: 0.8rem;
    }
    
    .verse-reference {
        font-size: 14px; /* 小屏幕下的引用字体大小 */
    }
    
    .generate-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

/* Print Styles */
@media print {
    .header, .footer, .generate-btn {
        display: none;
    }
    
    .verse-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    body {
        background: white;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .verse-text {
        border-left: 6px solid #d4af37;
        background: #fff;
        color: #000;
    }
    
    .generate-btn {
        background: #4a5568;
        color: #fff;
    }
}

/* Coming Soon Section */
.coming-soon-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    padding: 80px 0;
    margin-top: 60px;
}

.coming-soon-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.coming-soon-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 40px;
    background: linear-gradient(135deg, #6ba3d0 0%, #87ceeb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    animation: pulse 2s infinite;
}

.coming-soon-icon svg {
    width: 60px;
    height: 60px;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(107, 163, 208, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(107, 163, 208, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(107, 163, 208, 0);
    }
}

.coming-soon-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    position: relative;
}

.coming-soon-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(135deg, #6ba3d0 0%, #87ceeb 100%);
    border-radius: 2px;
}

.coming-soon-description {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    line-height: 1.7;
    color: #4a5568;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.features-preview {
    background: #ffffff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
    border: 1px solid #e8f2ff;
}

.preview-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 25px;
}

.preview-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.preview-list li {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 15px;
    position: relative;
    padding-left: 30px;
}

.preview-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: #6ba3d0;
    font-weight: bold;
    font-size: 1.2rem;
}

.cta-section {
    margin-top: 40px;
}

.cta-text {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: #4a5568;
    margin-bottom: 25px;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #6ba3d0 0%, #87ceeb 100%);
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(107, 163, 208, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 163, 208, 0.4);
    color: #ffffff;
    text-decoration: none;
}

/* Coming Soon Responsive Design */
@media (max-width: 768px) {
    .coming-soon-section {
        padding: 60px 0;
        margin-top: 40px;
    }
    
    .coming-soon-icon {
        width: 100px;
        height: 100px;
        margin-bottom: 30px;
    }
    
    .coming-soon-icon svg {
        width: 50px;
        height: 50px;
    }
    
    .coming-soon-title {
        font-size: 2.5rem;
    }
    
    .coming-soon-description {
        font-size: 1.1rem;
        margin-bottom: 40px;
    }
    
    .features-preview {
        padding: 30px 25px;
        margin-bottom: 30px;
    }
    
    .preview-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .coming-soon-section {
        padding: 40px 0;
    }
    
    .coming-soon-icon {
        width: 80px;
        height: 80px;
    }
    
    .coming-soon-icon svg {
        width: 40px;
        height: 40px;
    }
    
    .coming-soon-title {
        font-size: 2rem;
    }
    
    .coming-soon-description {
        font-size: 1rem;
    }
    
    .features-preview {
        padding: 25px 20px;
    }
    
    .cta-button {
        padding: 12px 25px;
        font-size: 0.95rem;
    }
}

/* Features Section */
.features-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #e6f2ff 100%);
    padding: 80px 0;
    margin-top: 60px;
}

.features-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.features-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(135deg, #6ba3d0 0%, #87ceeb 100%);
    border-radius: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-item {
    background: #ffffff;
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e8f2ff;
    position: relative;
    overflow: hidden;
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #6ba3d0 0%, #87ceeb 100%);
}

.feature-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(107, 163, 208, 0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, #6ba3d0 0%, #87ceeb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: all 0.3s ease;
}

.feature-icon svg {
    width: 40px;
    height: 40px;
}

.feature-item:hover .feature-icon {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(107, 163, 208, 0.3);
}

.feature-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.3;
}

.feature-description {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #4a5568;
    margin: 0;
}

/* Features Responsive Design */
@media (max-width: 768px) {
    .features-section {
        padding: 60px 0;
        margin-top: 40px;
    }
    
    .features-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0 20px;
    }
    
    .feature-item {
        padding: 30px 25px;
    }
    
    .feature-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
    }
    
    .feature-icon svg {
        width: 35px;
        height: 35px;
    }
    
    .feature-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .features-section {
        padding: 40px 0;
    }
    
    .features-title {
        font-size: 1.8rem;
    }
    
    .feature-item {
        padding: 25px 20px;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
    }
    
    .feature-icon svg {
        width: 30px;
        height: 30px;
    }
}

/* FAQ Section */
.faq-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    padding: 80px 0;
    margin-top: 60px;
}

.faq-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.faq-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(135deg, #6ba3d0 0%, #87ceeb 100%);
    border-radius: 2px;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: #ffffff;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e8f2ff;
}

.faq-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.faq-item.active {
    box-shadow: 0 8px 25px rgba(107, 163, 208, 0.2);
    border-color: #6ba3d0;
}

.faq-question {
    width: 100%;
    padding: 25px 30px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    transition: all 0.3s ease;
    position: relative;
}

.faq-question:hover {
    background: linear-gradient(135deg, #f8f9ff 0%, #e6f2ff 100%);
    color: #6ba3d0;
}

.faq-question-text {
    flex: 1;
    margin-right: 20px;
    line-height: 1.5;
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: 300;
    color: #6ba3d0;
    transition: all 0.3s ease;
    min-width: 24px;
    text-align: center;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
    color: #4a90e2;
}

.faq-answer {
    max-height: none;
    overflow: visible;
    transition: max-height 0.4s ease;
    background: #f8f9ff;
}

.faq-answer p {
    padding: 0 30px 25px 30px;
    margin: 0;
    font-size: 1rem;
    line-height: 1.7;
    color: #4a5568;
    font-family: 'Inter', sans-serif;
}

/* FAQ Responsive Design */
@media (max-width: 768px) {
    .faq-section {
        padding: 60px 0;
        margin-top: 40px;
    }
    
    .faq-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }
    
    .faq-question {
        padding: 20px;
        font-size: 1rem;
    }
    
    .faq-question-text {
        margin-right: 15px;
    }
    
    .faq-answer p {
        padding: 0 20px 20px 20px;
        font-size: 0.95rem;
    }
    
    .faq-icon {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .faq-section {
        padding: 40px 0;
    }
    
    .faq-title {
        font-size: 1.8rem;
    }
    
    .faq-question {
        padding: 15px;
    }
    
    .faq-answer p {
        padding: 0 15px 15px 15px;
    }
}

/* RTL Support for FAQ */
body[dir="rtl"] .faq-question {
    text-align: right;
}

body[dir="rtl"] .faq-question-text {
    margin-right: 0;
    margin-left: 20px;
}

body[dir="rtl"] .faq-icon {
    order: -1;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .faq-item {
        transition: none;
    }
    
    .faq-question {
        transition: none;
    }
    
    .faq-icon {
        transition: none;
    }
    
    .faq-answer {
        transition: none;
    }
}
