/* 自定义CSS样式 */

/* 修复z-index问题 */
.z-1 {
    z-index: 1;
}

/* 平滑滚动效果 */
html {
    scroll-behavior: smooth;
}

/* 背景渐变效果 */
.bg-gradient-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.6) 100%);
}

/* 图标悬停效果 */
.icon-hover-effect:hover {
    transform: translateY(-3px);
    transition: transform 0.3s ease;
}

/* 自定义按钮样式 */
.custom-button {
    transition: all 0.3s ease;
}

.custom-button:hover {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

/* 响应式字体调整 */
@media (max-width: 640px) {
    .responsive-text {
        font-size: 1.25rem;
    }
}

/* 自定义动画延迟 */
.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}

/* 淡入淡出效果 */
[data-aos="fade-up"] {
    transition: opacity 0.5s ease, transform 0.8s ease;
}

.opacity-0 {
    opacity: 0;
}

/* 背景图片过渡 */
.absolute.inset-0.z-0 img {
    transition: opacity 1s ease;
}

/* 阿拉伯文本样式 */
.arabic-text {
    direction: rtl;
    font-family: "Traditional Arabic", "Scheherazade", Arial, sans-serif;
    line-height: 1.8;
    letter-spacing: 0;
    font-weight: 500;
}

/* 增加文本对比度 */
.text-right {
    text-align: right;
}

/* 移动端阿拉伯文本调整 */
@media (max-width: 768px) {
    .arabic-text {
        font-size: 1.5rem;
        line-height: 1.6;
    }
}

/* 文本容器样式 */
.container {
    max-width: 900px;
}

/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    color: white;
    min-height: 100vh;
    overflow: hidden;
}

/* 诗篇容器 */
.verse-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 背景图片 */
.absolute {
    position: absolute;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.z-0 {
    z-index: 0;
}

.background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(65%);
    transition: all 0.5s ease;
}

/* 顶部工具栏 */
.top-toolbar {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 10;
    padding: 15px;
}

/* 语言控制区域 */
.language-control {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* 语言切换按钮样式 */
.language-switch {
    background-color: rgba(0, 0, 0, 0.6);
    padding: 8px 15px;
    border-radius: 30px;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.language-switch:hover {
    background-color: rgba(0, 0, 0, 0.7);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* 语言文本样式 */
.lang-ar, .lang-en {
    font-size: 0.9rem;
    transition: opacity 0.3s ease;
}

.lang-ar {
    opacity: 1;
}

.lang-en {
    opacity: 0.6;
}

/* 切换按钮样式 */
.form-check-input {
    cursor: pointer;
    height: 22px;
    width: 42px;
    appearance: none;
    -webkit-appearance: none;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    position: relative;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    margin: 0;
}

.form-check-input:checked {
    background-color: rgba(76, 175, 80, 0.8);
}

.form-check-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.form-check-input::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 2px;
    top: 2px;
    background-color: white;
    border-radius: 50%;
    transform: translateX(0);
    transition: transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.form-check-input:checked::before {
    transform: translateX(20px);
    background-color: white;
}

/* 语言状态基于复选框状态 */
#langSwitch:checked ~ .lang-ar {
    opacity: 0.6;
}

#langSwitch:checked ~ .lang-en {
    opacity: 1;
}

/* 诗篇内容 */
.verse-content {
    position: relative;
    z-index: 5;
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    transition: opacity 0.5s ease;
}

.verse-text {
    font-size: 2rem;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 20px;
    text-align: right;
    direction: rtl;
    transition: opacity 0.5s ease;
}

.verse-reference {
    font-size: 1.25rem;
    text-align: right;
    direction: rtl;
    opacity: 0.9;
    transition: opacity 0.5s ease;
}

/* 当语言是英文时覆盖方向 */
[lang="en"] .verse-text,
[lang="en"] .verse-reference {
    text-align: left;
    direction: ltr;
}

/* 控制按钮 */
.controls {
    position: absolute;
    bottom: 60px;
    display: flex;
    justify-content: center;
    gap: 20px;
    z-index: 5;
}

.control-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-button:hover {
    background-color: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.control-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* 播放按钮状态 */
#playButton {
    position: relative;
    overflow: hidden;
}

#playButton.playing {
    background-color: rgba(76, 175, 80, 0.8);
    border-color: rgba(76, 175, 80, 1);
}

#playButton.playing:hover {
    background-color: rgba(76, 175, 80, 0.9);
}

#playButton::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#playButton.playing::after {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
        transform: scale(0.9);
    }
    50% {
        opacity: 0.2;
        transform: scale(1.1);
    }
    100% {
        opacity: 0.5;
        transform: scale(0.9);
    }
}

/* 调试面板 */
.debug-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.8);
    color: #00ff00;
    font-family: monospace;
    font-size: 12px;
    padding: 10px;
    z-index: 100;
}

.hidden {
    display: none;
}

/* 淡入淡出过渡效果 */
.opacity-0 {
    opacity: 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .verse-text {
        font-size: 1.5rem;
    }
    
    .verse-reference {
        font-size: 1rem;
    }
    
    .control-button {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .verse-text {
        font-size: 1.2rem;
    }
    
    .controls {
        bottom: 50px;
    }
}

/* 添加CSS动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.verse-text, .verse-reference {
    animation: fadeIn 1s ease-out;
} 