
  * { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    font-family: 'Segoe UI', 'Arial', sans-serif;
    background: #eee9da;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    overflow-x: hidden;
  }

  /* ─── TOP BAR ─── */
  #topbar {
    width: 100%;
    max-width: 960px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 0 4px;
  }
  #topbar h1 {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
  }
  #topbar span {
    color: rgba(255,255,255,0.75);
    font-size: 12px;
  }

  /* ─── BOOK CONTAINER ─── */
  #book-wrap {
    width: 100%;
    max-width: 960px;
    perspective: 2000px;
    position: relative;
  }

  /* ─── BOOK (two pages side by side) ─── */
  #book {
    width: 100%;
    display: flex;
    position: relative;
    border-radius: 6px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.08);
    min-height: 520px;
  }

  /* ─── PAGE HALVES ─── */
  .page-half {
    flex: 1;
    position: relative;
    overflow: hidden;
  }
  .page-half.left  { border-radius: 6px 0 0 6px; }
  .page-half.right { border-radius: 0 6px 6px 0; }

  /* spine shadow */
  #spine {
    width: 6px;
    background: linear-gradient(to right, rgba(0,0,0,0.25), rgba(255,255,255,0.12), rgba(0,0,0,0.25));
    flex-shrink: 0;
    position: relative;
    z-index: 10;
  }

  /* ─── FLIP OVERLAY ─── */
  .flip-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 20;
    transform-origin: right center;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    transition: none;
  }
  .flip-overlay.flipping-left  {
    animation: flipLeft 0.55s cubic-bezier(.4,0,.2,1) forwards;
    transform-origin: left center;
  }
  .flip-overlay.flipping-right {
    animation: flipRight 0.55s cubic-bezier(.4,0,.2,1) forwards;
    transform-origin: right center;
  }

  @keyframes flipLeft {
    0%   { transform: rotateY(0deg); opacity: 1; }
    50%  { transform: rotateY(-90deg); opacity: 0.6; }
    100% { transform: rotateY(-180deg); opacity: 0; }
  }
  @keyframes flipRight {
    0%   { transform: rotateY(0deg); opacity: 1; }
    50%  { transform: rotateY(90deg); opacity: 0.6; }
    100% { transform: rotateY(180deg); opacity: 0; }
  }

  /* ─── PAGE CONTENT ─── */
  .page-content {
    width: 100%;
    height: 100%;
    min-height: 520px;
    padding: 22px 22px 18px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-sizing: border-box;
  }

  /* ═══ COVER ══════════════════════ */
  .cover-page {
    background: linear-gradient(160deg, #0d47a1 0%, #1565c0 50%, #1976d2 100%);
    color: #fff;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
  }
  .cover-star { font-size: 52px; }
  .cover-title { font-size: 26px; font-weight: 900; line-height: 1.2; letter-spacing: -0.5px; text-shadow: 0 2px 8px rgba(0,0,0,0.3); }
  .cover-sub   { font-size: 15px; color: rgba(255,255,255,0.85); }
  .cover-badge { margin-top: 16px; background: rgba(255,255,255,0.15); border: 1.5px solid rgba(255,255,255,0.3); border-radius: 20px; padding: 6px 18px; font-size: 13px; }
  .cover-stats { margin-top: 8px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
  .cover-stat  { text-align: center; }
  .cover-stat-n { font-size: 28px; font-weight: 900; }
  .cover-stat-l { font-size: 11px; color: rgba(255,255,255,0.75); margin-top: -2px; }

  /* ═══ BLANK (back cover left) ══ */
  .blank-page { background: #f5f0e8; }

  /* ═══ TOC ════════════════════════ */
  .toc-page { background: #fafafa; }
  .toc-header { font-size: 18px; font-weight: 800; color: #1565c0; border-bottom: 3px solid #1565c0; padding-bottom: 8px; margin-bottom: 14px; }
  .toc-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; cursor: pointer; transition: background 0.15s; margin-bottom: 4px; }
  .toc-item:hover { background: #e3f2fd; }
  .toc-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
  .toc-name { font-size: 13px; font-weight: 600; color: #1a237e; flex: 1; }
  .toc-count { font-size: 11px; color: #777; background: #e8eaf6; padding: 2px 7px; border-radius: 10px; }

  /* ═══ CONTENT PAGES ══════════════ */
  .content-page { background: #ffffff; }

  .pg-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8eaf6;
  }
  .pg-section-badge {
    padding: 4px 11px;
    border-radius: 14px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1.4;
  }
  .pg-header-text { flex: 1; min-width: 0; }
  .pg-tema { font-size: 10px; color: #777; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
  .pg-section-name { font-size: 13px; font-weight: 700; color: #1a237e; }

  /* ─── ENTRY ROWS ─── */
  .entries-wrap {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    justify-content: flex-start;
  }
  .entry {
    flex: 0 0 52px;
    height: 52px;
    display: flex;
    align-items: stretch;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.12s;
    width: 100%;
    box-sizing: border-box;
  }
  .entry:hover { transform: scale(1.012); }
  .entry-word-full {
    flex: 1;
    border-radius: 10px;
    padding: 0 16px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1.35;
    word-break: break-word;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .entry-word {
    padding: 7px 10px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    line-height: 1.35;
    word-break: break-word;
  }
  .entry-right { flex: 1; display: flex; flex-direction: column; gap: 0; display: none; }
  .entry-meaning-hidden { display: none; }
  .entry-meaning {
    flex: 1;
    padding: 7px 11px;
    font-size: 12.5px;
    color: #333;
    line-height: 1.45;
    background: #f8f9ff;
    border-top: 1px solid #e8eaf6;
    border-right: 1px solid #e8eaf6;
    border-bottom: 1px solid #e8eaf6;
    border-radius: 0 8px 8px 0;
  }

  /* Section colours — inline style ile verildiği için buraya gerek yok */

  /* alternating shades */
  .entry:nth-child(even) .entry-word-full { filter: brightness(1.1); }

  /* ─── PAGE FOOTER ─── */
  .pg-footer {
    margin-top: auto;
    padding-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    color: #aaa;
    border-top: 1px solid #eee;
  }
  .pg-num { font-weight: 600; color: #888; }

  /* ═══ BACK COVER ══════════════════ */
  .back-page {
    background: linear-gradient(160deg, #1b5e20 0%, #2e7d32 60%, #388e3c 100%);
    color: #fff;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 14px;
  }
  .back-icon { font-size: 48px; }
  .back-title { font-size: 20px; font-weight: 800; }
  .back-msg { font-size: 13px; color: rgba(255,255,255,0.82); max-width: 200px; line-height: 1.6; }

  /* ─── NAV BUTTONS ─── */
  #nav {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .nav-btn {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.18);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, transform 0.1s;
    backdrop-filter: blur(4px);
  }
  .nav-btn:hover:not(:disabled) { background: rgba(255,255,255,0.32); transform: scale(1.08); }
  .nav-btn:disabled { opacity: 0.3; cursor: default; }
  .nav-btn-edge {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.85);
    font-size: 15px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, transform 0.1s;
    backdrop-filter: blur(4px);
  }
  .nav-btn-edge:hover:not(:disabled) { background: rgba(255,255,255,0.25); transform: scale(1.08); }
  .nav-btn-edge:disabled { opacity: 0.25; cursor: default; }

  #page-indicator {
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    min-width: 100px;
    text-align: center;
    font-weight: 600;
  }

  /* ─── SEARCH BAR ─── */
  #search-wrap {
    width: 100%;
    max-width: 960px;
    margin-top: 12px;
    position: relative;
  }
  #search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border-radius: 24px;
    border: none;
    font-size: 14px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    outline: none;
    backdrop-filter: blur(6px);
    transition: background 0.2s;
  }
  #search-input::placeholder { color: rgba(255,255,255,0.55); }
  #search-input:focus { background: rgba(255,255,255,0.22); }
  #search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 16px; color: rgba(255,255,255,0.7); pointer-events: none; }

  /* ─── SEARCH RESULTS ─── */
  #search-results {
    display: none;
    position: absolute;
    top: 48px; left: 0; right: 0;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.3);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
  }
  .sr-item { padding: 10px 16px; cursor: pointer; border-bottom: 1px solid #f0f0f0; display: flex; align-items: flex-start; gap: 10px; }
  .sr-item:hover { background: #e3f2fd; }
  .sr-item:last-child { border-bottom: none; }
  .sr-word { font-weight: 700; color: #1565c0; min-width: 110px; font-size: 13px; }
  .sr-meaning { font-size: 12px; color: #555; line-height: 1.4; }
  .sr-badge { font-size: 10px; background: #e8eaf6; color: #555; padding: 1px 7px; border-radius: 8px; margin-left: auto; white-space: nowrap; }
  #sr-empty { padding: 16px; text-align: center; color: #999; font-size: 13px; }

  .has-baglamlar { cursor: pointer; }
  .has-baglamlar:hover { transform: scale(1.015) !important; filter: brightness(1.08); }
  .baglamlar-hint { font-size: 9.5px; color: #aaa; padding: 2px 11px 4px; font-style: italic; }

  /* ─── TAHMİN MODALi ─── */
  #tahmin-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.55); z-index: 1000;
    align-items: center; justify-content: center;
  }
  #tahmin-overlay.open { display: flex; }
  #tahmin-modal {
    background: #fff; border-radius: 18px;
    width: min(92vw, 460px); padding: 0;
    box-shadow: 0 12px 48px rgba(0,0,0,0.28);
    overflow: hidden; animation: popIn .18s ease;
  }
  @keyframes popIn { from { transform: scale(.88); opacity:0; } to { transform: scale(1); opacity:1; } }
  #tahmin-header {
    padding: 16px 20px 12px;
    display: flex; align-items: center; gap: 10px;
    background: #1565c0;
  }
  #tahmin-kelime-badge {
    background: rgba(255,255,255,0.2); color: #fff;
    font-weight: 800; font-size: 16px;
    padding: 6px 14px; border-radius: 30px;
    letter-spacing: 0.3px;
  }
  #tahmin-metin-tag {
    font-size: 10.5px; color: rgba(255,255,255,0.75);
    margin-left: auto;
  }
  #tahmin-body { padding: 16px 20px 0; }
  #tahmin-soru {
    font-size: 11px; color: #888; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.6px;
    margin-bottom: 8px;
  }
  #tahmin-baglamlar-cumle {
    background: #f0f4ff; border-left: 4px solid #1565c0;
    border-radius: 0 10px 10px 0;
    padding: 11px 14px; font-size: 13.5px;
    color: #222; line-height: 1.6; font-style: italic;
    margin-bottom: 14px;
  }
  #tahmin-tahmin-label {
    font-size: 11px; font-weight: 700; color: #555;
    text-transform: uppercase; letter-spacing: 0.5px;
    margin-bottom: 6px;
  }
  #tahmin-textarea {
    width: 100%; box-sizing: border-box;
    border: 2px solid #dce1f0; border-radius: 10px;
    padding: 10px 12px; font-size: 13.5px;
    font-family: inherit; color: #222;
    line-height: 1.5; resize: none; outline: none;
    transition: border-color .15s;
    margin-bottom: 12px;
  }
  #tahmin-textarea:focus { border-color: #1565c0; }
  #tahmin-textarea.revealed { background: #fafafa; color: #777; border-color: #ddd; }
  #tahmin-action {
    display: flex; justify-content: center;
    margin-bottom: 14px;
  }
  #tahmin-goster-btn {
    background: #1565c0; color: #fff;
    border: none; border-radius: 30px;
    padding: 10px 28px; font-size: 14px;
    font-weight: 700; cursor: pointer;
    transition: background .15s;
  }
  #tahmin-goster-btn:hover { background: #0d47a1; }
  #tahmin-anlam-box {
    display: none;
    border-radius: 10px; overflow: hidden;
    margin-bottom: 14px;
    animation: fadeIn .25s ease;
  }
  @keyframes fadeIn { from { opacity:0; transform: translateY(6px); } to { opacity:1; transform:none; } }
  .anlam-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  }
  .anlam-col {
    padding: 10px 13px 12px;
  }
  .anlam-col-tahmin {
    background: #fff8e1; border: 1.5px solid #ffe082;
    border-radius: 10px 0 0 10px;
  }
  .anlam-col-dogru {
    background: #e8f5e9; border: 1.5px solid #a5d6a7;
    border-left: none;
    border-radius: 0 10px 10px 0;
  }
  .anlam-col-label {
    font-size: 10px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.6px;
    margin-bottom: 5px;
  }
  .anlam-col-tahmin .anlam-col-label { color: #f57f17; }
  .anlam-col-dogru  .anlam-col-label { color: #2e7d32; }
  .anlam-col-text {
    font-size: 12.5px; line-height: 1.5; color: #333;
  }
  #tahmin-kapat {
    display: block; width: 100%; text-align: center;
    padding: 11px; font-size: 13px; color: #aaa;
    cursor: pointer; border: none; background: none;
    border-top: 1px solid #eee;
  }
  #tahmin-kapat:hover { color: #555; }

  /* ─── TEMA ARKA PLANLARI ─── */
  .page-content {
    position: relative;
  }
  .page-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.30;
    z-index: 0;
    border-radius: inherit;
    pointer-events: none;
  }
  .page-content > * {
    position: relative;
    z-index: 1;
  }
.bg-tema2::before { background-image: url('assets/8b5a1137ac3b.webp'); }
.bg-tema4::before { background-image: url('assets/7494615e79bf.webp'); }
.bg-tema6::before { background-image: url('assets/2a8057ae1160.webp'); }
  
.bg-tema1::before{background-image:url("assets/cf2e18a31e0a.webp");opacity:0.82;background-size:100% 100%}
.bg-tema2::before{background-image:url("assets/27c7661434f1.webp");opacity:0.82;background-size:100% 100%}
.bg-tema3::before{background-image:url("assets/9d19dfeb4883.webp");opacity:0.82;background-size:100% 100%}
.bg-tema4::before{background-image:url("assets/412c46901574.webp");opacity:0.82;background-size:100% 100%}
.bg-tema5::before{background-image:url("assets/910c8ecfb403.webp");opacity:0.82;background-size:100% 100%}
.bg-tema6::before{background-image:url("assets/abbf837b3374.webp");opacity:0.82;background-size:100% 100%}
.bg-tema7::before{background-image:url("assets/d7c06ff92bd0.webp");opacity:0.82;background-size:100% 100%}
.bg-tema8::before{background-image:url("assets/792a0807cf40.webp");opacity:0.82;background-size:100% 100%}

.toc-item{padding:6px 8px;gap:7px}.toc-name{font-size:12px}.toc-count{font-size:10px;white-space:nowrap}
.cover-title{font-size:27px}.cover-sub{line-height:1.6}.entry{cursor:pointer}.entry:focus-visible,.toc-item:focus-visible{outline:3px solid #eea62b;outline-offset:3px}
.entry-word{display:flex;align-items:center;justify-content:space-between;text-align:left;padding:9px 12px;border:0;color:white;font-family:inherit;cursor:pointer;gap:8px}
.entry-word small{font-size:10px;opacity:.85;white-space:nowrap}.entry-word:hover{filter:brightness(1.13)}
.content-page{min-height:590px}.content-page .entry{height:44px;flex-basis:44px}.content-page .entries-wrap{gap:6px}.content-page .pg-footer{background:#ffffffb8;border-radius:4px;padding:5px 4px;color:#607080}.content-page .pg-header{background:#ffffffbd;border-radius:6px;padding:4px 6px}.content-page .entry-word{box-shadow:0 2px 6px #15345116}
.entry-label{display:flex;flex-direction:column;gap:2px;min-width:0}.entry-source{font-size:10px;font-weight:500;line-height:1.2;letter-spacing:.1px;color:#fff5d9}.entry-word.has-listening{border-color:#efdfaaa6}.listening-icon{font-size:15px;flex-shrink:0;opacity:.95}
#tahmin-modal,#tahmin-box{max-height:90vh;overflow-y:auto}#tahmin-baglamlar-cumle{font-style:normal}
.source-note{font-size:10px;color:#5c6980;line-height:1.5;margin-top:8px}.source-note a{color:inherit}
.bg-tema7{background:#fff6fb}.bg-tema8{background:#f1f5ff}
.utility{display:flex;justify-content:center;gap:12px;margin-top:12px;flex-wrap:wrap}.utility a,.utility button{font:12px 'Segoe UI',sans-serif;color:white;background:#ffffff1c;border:1px solid #ffffff55;border-radius:8px;padding:7px 12px;text-decoration:none;cursor:pointer}
@media(max-width:620px){#topbar{flex-direction:column;gap:5px}.cover-title{font-size:20px}.cover-stat-n{font-size:22px}.cover-badge{font-size:11px}.page-content{padding:12px 10px!important}.toc-item{flex-wrap:wrap}.toc-name{font-size:11px}.toc-count{margin-left:17px}.pg-tema{font-size:12px}.pg-section-name{font-size:10px}.entry-word{font-size:12px!important;padding:9px 7px}.pg-footer{font-size:8px}.cover-stats{gap:12px}#book{min-height:610px}.page-content{min-height:610px}.toc-header{font-size:18px}.entry-word small{display:none}}
@media(max-width:620px){#book{flex-direction:column}#spine{display:none}.page-half{width:100%;border-radius:6px!important}.cover-page{min-height:390px!important}.toc-item{flex-wrap:nowrap;min-height:40px}.toc-name{font-size:12px;flex:1}.toc-count{margin-left:0}.page-content{min-height:540px}.cover-stats{gap:24px}.cover-title{font-size:25px}.cover-sub{font-size:13px}.entry-word small{display:inline}.pg-footer{font-size:10px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}


body{background-color:#ecebdc;background-image:linear-gradient(#f8f4e327,#edf0e733),url("assets/7d790b5efa7b.webp");background-size:cover;background-position:center;background-attachment:fixed}
#topbar h1{color:#304f40;text-shadow:0 1px 5px #fff9}#topbar span{color:#496452;text-shadow:0 1px 4px #fff8}
#book{box-shadow:0 20px 65px #35473730,0 0 0 1px #7b816132}
.cover-page{background:radial-gradient(ellipse at 15% 10%,#a5b38b44,transparent 60%),linear-gradient(155deg,#365a48,#55735a 65%,#7a8967);color:#fff9e9}.cover-sub{color:#f4efdb}.cover-badge{background:#f2eadc20;border-color:#e9ddba60}.cover-stats{color:#fff8e5}
.content-page .entry-word{border:1px solid #fff5;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);text-shadow:0 1px 2px #18332140;box-shadow:0 3px 10px #193a2920}.content-page .entry-word:hover{filter:brightness(1.06);border-color:#fff9}
.pg-section-name{color:#3f5a48}.pg-tema{color:#5a6b52}.toc-header{color:#365a48;border-color:#728b69}.toc-name{color:#354d3b}.toc-item:hover{background:#e7eddf}.toc-count{background:#e5eadf;color:#53664f}
.nav-btn,.nav-btn-edge{background:#faf6e1d9;color:#3c5b45;border:1px solid #71836550;box-shadow:0 3px 12px #34473512;backdrop-filter:blur(8px)}.nav-btn:hover:not(:disabled),.nav-btn-edge:hover:not(:disabled){background:#fff9e9;color:#25432f}.nav-btn:disabled,.nav-btn-edge:disabled{opacity:.36}#page-indicator{color:#3b5844;text-shadow:0 1px 4px #fff9}
#search-input{background:#fffcf0df;color:#304a3b;border:1px solid #86927366;box-shadow:0 4px 18px #334a2f12}#search-input::placeholder{color:#6d7d68}#search-results{background:#fffdf5;color:#344c3b;border-color:#c7cfb7}.sr-word{color:#35543f}.sr-item:hover{background:#e9efdf}.sr-badge{color:#63735b}
.utility a,.utility button{background:#fff9e0b8;color:#39543d;border-color:#81926d66;backdrop-filter:blur(6px)}.utility a:hover,.utility button:hover{background:#fffbed}
#tahmin-modal{background:#fffdf7}#tahmin-header,#tahmin-goster-btn{background:#456b51}#tahmin-goster-btn:hover{background:#34553e}#tahmin-baglamlar-cumle{background:#eff2e8;border-color:#6a8865}#tahmin-textarea{background:#fffef9;border-color:#d7dfcd}#tahmin-textarea:focus{border-color:#708b65}

dialog{border:1px solid #b6c2a7;border-radius:18px;background:#fffdf4;color:#354e3b;padding:26px;max-width:480px;width:90%;margin:auto;box-shadow:0 20px 60px #20302033}dialog::backdrop{background:#23362888}dialog p{font-size:14px;line-height:1.7;margin:14px 0}dialog button{background:#456b51;color:white;border:0;border-radius:8px;padding:9px 20px;cursor:pointer}
.site-return{color:#365b4d;font:600 12px/1.5 Arial,sans-serif;text-decoration:none;padding:9px}.site-return:focus-visible{outline:3px solid #b87a27;outline-offset:3px}
