/*
Theme Name: Thutasone Library Premium V3.1
Theme URI: https://thutasone.com
Author: OpenAI
Description: Premium dynamic Ebook and Audiobook WordPress theme with reader and player fixes.
Version: 3.1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: thutasone-library-premium
*/
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');
:root{--orange:#f97316;--text:#1f2937;--muted:#6b7280;--line:#e5e7eb}
*{box-sizing:border-box} html{scroll-behavior:smooth}
body{margin:0;font-family:'Plus Jakarta Sans',system-ui,sans-serif;background:#fff;color:var(--text)}
img{max-width:100%;display:block} a{text-decoration:none;color:inherit}
.container{max-width:1280px;margin:0 auto;padding:0 16px}
.site-header{position:sticky;top:0;z-index:100;background:rgba(255,255,255,.95);backdrop-filter:blur(12px);border-bottom:1px solid #f1f5f9;box-shadow:0 1px 10px rgba(0,0,0,.03)}
.header-inner{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:64px}
.brand{font-size:24px;font-weight:800;color:var(--orange)}
.header-left,.header-right{display:flex;align-items:center;gap:16px}
.icon-btn{appearance:none;border:0;background:none;cursor:pointer;color:#4b5563;font-size:18px}
.search-wrap{position:relative}.search-wrap input{width:220px;max-width:48vw;border:0;outline:0;background:#f3f4f6;padding:10px 14px 10px 34px;border-radius:999px;font-size:12px}.search-wrap i{position:absolute;left:12px;top:10px;color:#9ca3af;font-size:12px}
.avatar{width:32px;height:32px;border-radius:999px;border:2px solid #ffedd5;overflow:hidden}
.genre-tabs{display:flex;gap:24px;overflow:auto;padding:12px 0;font-size:12px;font-weight:700;color:#9ca3af;border-top:1px solid #f8fafc}.genre-tabs::-webkit-scrollbar{display:none}
.genre-tab{white-space:nowrap;cursor:pointer}.genre-tab.active,.genre-tab:hover{color:var(--orange);border-bottom:2px solid var(--orange)}
.mobile-sidebar{position:fixed;top:0;left:0;bottom:0;width:288px;background:#fff;z-index:200;box-shadow:0 25px 60px rgba(0,0,0,.18);transform:translateX(-100%);transition:transform .3s ease}.mobile-sidebar.open{transform:translateX(0)}
.sidebar-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:190;display:none}.sidebar-overlay.show{display:block}
.sidebar-head,.sidebar-foot{padding:24px;border-bottom:1px solid var(--line)} .sidebar-foot{border-top:1px solid var(--line);border-bottom:0;font-size:10px;color:#9ca3af}
.sidebar-nav{padding:16px;display:grid;gap:8px}.sidebar-nav a{display:flex;align-items:center;gap:12px;padding:12px;border-radius:14px;color:#374151;font-weight:600}.sidebar-nav a:hover{background:#fff7ed;color:var(--orange)}
.hero-grid{display:grid;grid-template-columns:1fr;gap:16px;margin:24px 0 40px}@media(min-width:900px){.hero-grid{grid-template-columns:1fr 1fr}}
.hero-card{min-height:224px;border-radius:24px;overflow:hidden;position:relative;box-shadow:0 10px 30px rgba(0,0,0,.08)} .hero-card img{width:100%;height:100%;object-fit:cover}
.hero-overlay{position:absolute;inset:0;padding:32px;display:flex;flex-direction:column;justify-content:center;color:#fff;background:linear-gradient(90deg,rgba(0,0,0,.58),transparent)}
.hero-btn{margin-top:12px;display:inline-flex;align-items:center;justify-content:center;width:max-content;background:var(--orange);color:#fff;padding:10px 24px;border-radius:12px;font-size:12px;font-weight:800}
.section{margin:0 0 48px}.section-alt{padding:40px 24px;background:#f9fafb;border-radius:28px;border-top:1px solid #f3f4f6;border-bottom:1px solid #f3f4f6}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:24px}
.section-title{font-size:20px;font-weight:800;color:#1f2937;margin:0}.section-title.upper{font-size:18px;text-transform:uppercase;letter-spacing:.08em}.section-title.red{color:#dc2626}.section-title.orange{color:var(--orange)}.section-title.yellow{color:#ca8a04}
.section-link{font-size:14px;font-weight:800}.section-link:hover{text-decoration:underline}.line-red{border-bottom:2px solid #dc2626;padding-bottom:4px}.line-orange{border-bottom:2px solid var(--orange);padding-bottom:4px}
.hscroll{display:flex;gap:20px;overflow:auto;padding-bottom:8px}.hscroll::-webkit-scrollbar{display:none}
.category-card,.author-card{flex:0 0 auto;text-align:center;cursor:pointer}.category-thumb{width:80px;height:80px;border-radius:18px;overflow:hidden;border:1px solid var(--line);margin:0 auto 8px}.author-avatar{width:64px;height:64px;border-radius:999px;overflow:hidden;background:#fb923c;padding:2px;margin:0 auto}.author-avatar img{width:100%;height:100%;object-fit:cover;border-radius:999px;border:2px solid #fff}.mini-label{font-size:10px;font-weight:800;color:#6b7280}
.grid-books{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}@media(min-width:640px){.grid-books{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(min-width:900px){.grid-books{grid-template-columns:repeat(6,minmax(0,1fr))}}@media(min-width:1280px){.grid-books{grid-template-columns:repeat(8,minmax(0,1fr))}}
.book-card{cursor:pointer}.book-thumb-wrap{position:relative;margin-bottom:8px;border-radius:16px;overflow:hidden;border:1px solid #f1f5f9;box-shadow:0 4px 10px rgba(0,0,0,.04)}.book-thumb{width:100%;aspect-ratio:2/3;object-fit:cover}.play-badge{position:absolute;right:8px;bottom:8px;width:28px;height:28px;border-radius:999px;display:grid;place-items:center;background:var(--orange);color:#fff}.book-title{font-size:11px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.blog-grid{display:grid;grid-template-columns:1fr;gap:32px}@media(min-width:700px){.blog-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(min-width:1100px){.blog-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
.blog-thumb{height:220px;border-radius:16px;overflow:hidden;background:#f3f4f6;position:relative;box-shadow:0 4px 10px rgba(0,0,0,.04);margin-bottom:16px}.blog-thumb img{width:100%;height:100%;object-fit:cover}.blog-meta{display:flex;gap:8px;align-items:center;font-size:10px;font-weight:800;color:var(--orange);margin-bottom:8px;text-transform:uppercase}.blog-meta .dot{color:#d1d5db}.blog-date{color:#9ca3af}.blog-title{font-weight:800;line-height:1.5}
.site-footer{background:#111827;color:#9ca3af;padding:48px 0}.footer-grid{display:grid;grid-template-columns:1fr;gap:32px;margin-bottom:32px}@media(min-width:900px){.footer-grid{grid-template-columns:2fr 1fr 1fr}}.footer-title{color:#fff;font-size:28px;font-weight:800;margin:0 0 16px}.footer-head{color:#fff;font-weight:800;margin-bottom:16px}.footer-links{list-style:none;padding:0;margin:0;display:grid;gap:8px;font-size:14px}.footer-links a:hover{color:var(--orange)}.footer-bottom{border-top:1px solid #1f2937;padding-top:24px;display:flex;flex-direction:column;gap:16px;align-items:center;justify-content:space-between}@media(min-width:900px){.footer-bottom{flex-direction:row}}.socials{display:flex;gap:16px}
.modal{position:fixed;inset:0;z-index:220;background:rgba(0,0,0,.8);display:none;align-items:center;justify-content:center;padding:0}.modal.show{display:flex}
.viewer{background:#fff;width:min(1024px,100%);height:100%;max-height:90vh;display:flex;flex-direction:column;overflow:hidden}@media(min-width:768px){.viewer{border-radius:28px}}
.viewer-header{padding:20px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:16px;position:sticky;top:0;background:#fff;z-index:2}
.viewer-book{display:flex;gap:16px;align-items:center}.viewer-book img{width:40px;height:56px;object-fit:cover;border-radius:6px;box-shadow:0 4px 10px rgba(0,0,0,.1)} .close-btn{width:40px;height:40px;border-radius:999px;border:0;background:#f3f4f6;cursor:pointer}
.viewer-content{flex:1;overflow:auto;padding:16px 16px 48px;transition:background .3s,color .3s}@media(min-width:768px){.viewer-content{padding:48px}}
.reader-controls{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-between;align-items:center;margin-bottom:24px;padding-bottom:16px;border-bottom:1px solid #f3f4f6}
.theme-group{display:flex;gap:8px;background:#f3f4f6;padding:4px;border-radius:12px}.theme-btn{width:32px;height:32px;border:0;border-radius:8px;cursor:pointer;background:transparent}.theme-btn.active{background:#fff}
.font-controls{display:flex;gap:8px}.font-btn{padding:8px 12px;border-radius:10px;border:1px solid var(--line);background:#fff;font-size:12px;font-weight:800;cursor:pointer}
.reader-text{max-width:860px;margin:0 auto;font-size:18px;line-height:2}.reader-text h2{font-size:36px;line-height:1.15;margin-top:0;margin-bottom:24px}.reader-text p{margin:0 0 20px}
.reader-light{background:#fff;color:#1a202c}.reader-dark{background:#1a1a1a;color:#e2e8f0}.reader-sepia{background:#f4ecd8;color:#5b4636}
.audio-wrap{max-width:560px;margin:0 auto;padding:24px 0}.cd-wrap{position:relative;margin:0 auto 48px;width:256px;height:256px}.cd{width:100%;height:100%;border-radius:999px;border:10px solid #111827;background:#000;overflow:hidden;display:flex;align-items:center;justify-content:center}.cd img{width:100%;height:100%;object-fit:cover;opacity:.72}.cd-center{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:48px;height:48px;border-radius:999px;background:#fff;border:4px solid #111827}
.audio-panel{background:rgba(255,255,255,.9);padding:24px 32px;border-radius:24px;border:1px solid #f3f4f6;box-shadow:0 12px 30px rgba(0,0,0,.08)}.audio-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:24px}.audio-progress-bg{height:4px;width:100%;background:#f3f4f6;border-radius:999px;overflow:hidden;margin-bottom:24px}.audio-progress-fill{height:100%;background:var(--orange);width:0%}.audio-controls{display:flex;align-items:center;justify-content:space-around;gap:16px;margin-bottom:24px}.audio-btn{border:0;background:transparent;color:#9ca3af;font-size:22px;cursor:pointer}.audio-btn.main{width:64px;height:64px;border-radius:999px;background:var(--orange);color:#fff}.audio-volume{display:flex;align-items:center;gap:12px;color:#9ca3af}.audio-range{flex:1}
.full-modal{position:fixed;inset:0;z-index:210;background:#fff;display:none;flex-direction:column}.full-modal.show{display:flex}.full-header{padding:24px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:16px;justify-content:space-between;position:sticky;top:0;background:#fff;z-index:1}.full-grid{padding:24px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;overflow:auto}@media(min-width:640px){.full-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(min-width:900px){.full-grid{grid-template-columns:repeat(6,minmax(0,1fr))}}@media(min-width:1280px){.full-grid{grid-template-columns:repeat(8,minmax(0,1fr))}}
.animate-cd{animation:rotate-cd 12s linear infinite}.paused{animation-play-state:paused}@keyframes rotate-cd{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}
.thutasone-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.thutasone-grid label{display:block;font-weight:600;margin-bottom:6px}.thutasone-grid input,.thutasone-grid textarea{width:100%}.thutasone-grid .full{grid-column:1/-1}
