
/* 神爱浸信教会 OBIBLEO SPA v6.0 - 最终版：手机版导航间距收紧 + 左右边距舒适 + 文字不超出屏幕 */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700&family=Playfair+Display:wght@600;700&display=swap');

body {
    font-family: 'Georgia', 'Playfair Display', 'Segoe UI', serif;
    background: url('bg/parchment.jpg') repeat fixed;
    background-size: 800px 800px;
    color: #4a3728;
    margin: 0;
    padding: 0;
    line-height: 1.7;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(248, 242, 232, 0.222);
    pointer-events: none;
    z-index: -1;
}

.top-header {
    text-align: center;
    padding: 30px 0 20px;
    background: linear-gradient(135deg, #faf1e3, #f0e6d6);
    box-shadow: 0 4px 15px rgba(139,105,20,0.15);
    position: relative;
}

.top-header::before,
.top-header::after {
    content: "";
    position: absolute;
    width: 80px;
    height: 40px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 40"><path d="M0,20 Q40,0 80,20 Q40,40 0,20 Z" fill="%23d4b894"/></svg>') no-repeat;
    top: 15px;
}

.top-header::before { left: 10%; }
.top-header::after { right: 10%; transform: scaleX(-1); }

h1 {
    margin: 0 0 10px;
    color: #5c4033;
    font-size: 40px;
    font-family: 'Cinzel', 'Playfair Display', serif;
    font-weight: 700;
    letter-spacing: 4px;
    text-shadow: 1px 1px 2px rgba(139,105,20,0.3);
}

.search-container {
    max-width: 380px;
    margin: 20px auto;
    background: #e8dcc8;
    border-radius: 20px;
    box-shadow: 
        inset 0 6px 15px rgba(139,105,20,0.3),
        0 8px 20px rgba(0,0,0,0.2);
    padding: 16px;
    border: 3px double #b8860b;
    position: relative;
}

.search-bar {
    background: #fffdf7;
    border-radius: 12px;
    border: 2px solid #d4b894;
    overflow: hidden;
    height: 48px;
    box-shadow: inset 0 4px 10px rgba(139,105,20,0.2);
}

#globalSearch {
    width: 100%;
    border: none;
    padding: 12px 12px 12px 44px;
    font-size: 1.1em;
    color: #4a3728;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="%238b6914" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="M21 21l-4.35-4.35"/></svg>') no-repeat 14px center;
    background-size: 18px;
    outline: none;
    font-family: Georgia, serif;
}

#searchResults {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    background: #faf1e3;
    border: 2px solid #d4b894;
    border-radius: 12px;
    max-height: 320px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(139,105,20,0.3);
}

#searchResults div {
    padding: 12px 16px;
    border-bottom: 1px dashed #d4b894;
    cursor: pointer;
    transition: background 0.3s;
}

#searchResults div:hover {
    background: #f0e6d6;
}

mark {
    background: #ffd700;
    color: #5c4033;
    padding: 0 3px;
    border-radius: 3px;
}

.breadcrumb {
    padding: 12px 20px;
    color: #5c4033;
    font-size: 15px;
    white-space: nowrap;
    overflow-x: auto;
    background: rgba(250, 241, 227, 0.222);  /* 半透明浅羊皮纸色 */
    margin: 0 15px 12px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(139,105,20,0.15);
    border: 1px solid #e2d1b5;
    backdrop-filter: blur(4px);  /* 可选：添加轻微毛玻璃效果，更高级 */
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
    padding: 25px;
    max-width: 1400px;
    margin: 0 auto;
}

.folder-book {
    perspective: 1200px;
    cursor: pointer;
    position: relative;
}

.folder-book::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 15%;
    bottom: 15%;
    width: 12px;
    background: linear-gradient(to right, #8b6914, #b8860b);
    border-radius: 6px;
    box-shadow: inset -3px 0 8px rgba(0,0,0,0.3);
    z-index: 1;
}

.folder-book .book-cover {
    height: 230px;
    background: linear-gradient(135deg, #fffef5, #f5ebdb);
    border-radius: 12px;
    border: 3px double #b8860b;
    box-shadow: 
        0 15px 40px rgba(139,105,20,0.4),
        inset 0 3px 10px rgba(255,255,255,0.8),
        inset 0 -3px 10px rgba(139,105,20,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all .5s ease;
    position: relative;
    overflow: hidden;
}

.folder-book .book-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255,240,200,0.4), transparent 50%);
}

.folder-book:hover .book-cover {
    transform: translateY(-12px) rotateX(18deg);
    box-shadow: 0 25px 50px rgba(139,105,20,0.45);
}

.folder-book:hover .folder-icon {
    transform: scale(1.15);
    transition: transform 0.4s ease;
}

.folder-icon {
    font-size: 64px;
    margin-bottom: 18px;
    filter: drop-shadow(2px 2px 4px rgba(139,105,20,0.3));
    transition: transform 0.4s ease;
}

.folder-name {
    font-weight: 600;
    color: #5c4033;
    font-size: 1.25em;
    text-shadow: 1px 1px 1px rgba(255,255,255,0.8);
    position: relative;
}

a { text-decoration: none !important; color: inherit !important; }

.folder-book:hover .folder-name::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    width: 70%;
    height: 3px;
    background: #b8860b;
    border-radius: 2px;
    transform: translateX(-50%);
    opacity: 0.9;
    transition: all 0.3s ease;
}

.file-card a:hover { color: #a0522d; }

@media (max-width: 768px) {
    .folder-icon { font-size: 48px; margin-bottom: 14px; }
    .folder-book .book-cover { height: 220px; }
    .folder-name { font-size: 1.2em; }
    .grid-container { gap: 20px; padding: 20px; }
    .top-nav { gap: 0; padding: 0 16px; justify-content: space-evenly; overflow: visible; }
    .top-nav a { flex: 1; font-size: 13px; padding: 10px 2px; text-align: center; letter-spacing: 0.5px; min-width: 0; }
}

.audio-item {
    grid-column: 1/-1;
    background: linear-gradient(135deg, #fffdf7, #faf1e3);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(139,105,20,0.25);
    margin: 15px 20px;
    padding: 24px 30px;
    border: 2px solid #d4b894;
    transition: all .4s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.audio-item:hover {
    box-shadow: 0 15px 35px rgba(139,105,20,0.35);
    transform: translateY(-4px);
}

.audio-item .filename {
    font-weight: 600;
    color: #5c4033;
    font-size: 1.15em;
    margin-bottom: 18px;
    word-break: break-word;
    font-family: Georgia, serif;
}

.audio-item audio {
    width: 100%;
    max-width: 800px;
    height: 60px;
    background: #f0e6d6;
    border-radius: 15px;
    border: 1px solid #d4b894;
    outline: none;
}

.audio-item audio::-webkit-media-controls-panel {
    background: linear-gradient(to bottom, #f5ebdb, #ede2d0);
    border-radius: 15px;
}

@media (max-width: 768px) {
    .audio-item { padding: 20px 20px; margin: 15px 10px; }
    .audio-item audio { height: 52px; max-width: 100%; }
    .audio-item .filename { font-size: 1.1em; margin-bottom: 14px; }
}

.file-card {
    background: linear-gradient(135deg, #fffdf7, #faf1e3);
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(139,105,20,0.25);
    padding: 28px;
    text-align: center;
    border: 2px solid #d4b894;
}

.file-card a::after {
    content: " ↗";
    font-size: 0.8em;
    opacity: 0.7;
}

.top-fixed {
    text-align: center;
    padding: 25px 15px 20px;
    background: rgba(250, 241, 227, 0.2);
    box-shadow: 0 4px 15px rgba(139,105,20,0.1);
    position: relative;
    z-index: 10;
}

.top-fixed h1 {
    margin: 0 0 15px;
    font-size: 34px;
    color: #5c4033;
}

.top-nav {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 0 10px;
}

.top-nav a {
    color: #5c4033;
    font-size: 20px;
    font-weight: 600;
    font-family: 'Cinzel', 'Playfair Display', serif;
    letter-spacing: 1.5px;
    padding: 8px 12px;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.top-nav a:hover { color: #b8860b; }
.top-nav a.active { color: #b8860b; font-weight: 700; }

@media (max-width: 768px) {
    .top-nav { gap: 0; padding: 0 16px; justify-content: space-between; width: 100%; box-sizing: border-box; }
    .top-nav a { flex: 1 1 0; font-size: 17px; padding: 10px 0; text-align: center; letter-spacing: 0.5px; min-width: 0; white-space: nowrap; }
}

footer {
    text-align: center;
    padding: 50px 20px;
    font-size: 0.95em;
    line-height: 1.9;
    color: #6b4f3a;
    background: rgba(250, 241, 227, 0.222);
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 140px;
    margin: 0;
    text-shadow: 1px 1px 1px rgba(255,255,255,0.6);
    border-top: 1px solid rgba(212, 184, 148, 0.3);
}
