/* Matosfer — Yıldız Çin Daması V3.7 */
:root{
  --bg:#f4f2ff;
  --paper:rgba(255,255,255,.78);
  --paper-strong:rgba(255,255,255,.94);
  --ink:#172443;
  --muted:#667795;
  --purple:#7c3aed;
  --purple-dark:#4c1d95;
  --purple-soft:#dccaff;
  --blue:#63cfff;
  --blue-deep:#4a8cff;
  --blue-soft:#ccefff;
  --orange:#f2ad27;
  --orange-dark:#a76500;
  --teal:#2aa9d4;
  --hole-top:#ffffff;
  --hole-mid:#e8edf5;
  --hole-bottom:#b6c1d1;
}


*{box-sizing:border-box}
html,body{
  padding:12px;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  color:var(--ink);
  background:
    radial-gradient(ellipse 42% 55% at 2% 0%,rgba(206,171,255,.76) 0%,rgba(206,171,255,.36) 34%,transparent 62%),
    radial-gradient(ellipse 42% 55% at 100% 0%,rgba(132,221,255,.70) 0%,rgba(132,221,255,.30) 34%,transparent 62%),
    radial-gradient(ellipse 44% 58% at 0% 100%,rgba(116,220,255,.62) 0%,rgba(116,220,255,.24) 35%,transparent 64%),
    radial-gradient(ellipse 44% 58% at 100% 100%,rgba(213,178,255,.68) 0%,rgba(213,178,255,.25) 36%,transparent 65%),
    linear-gradient(135deg,#fafbff 0%,#f1f5ff 48%,#eef7ff 100%);
}
button{font:inherit}

.app{
  width:min(100%,1180px);
  height:calc(100vh - 24px);
  min-height:0;
  margin:auto;
  padding:10px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  grid-template-rows:minmax(0,1fr);
  gap:14px;
  align-items:stretch;
}

.game-area{min-width:0;min-height:0;height:100%;display:grid;place-items:center}

/* Square canvas = mockup's pastel background. The star-shaped frame sits above it. */
.board-shell{
  position:relative;
  width:min(100%,calc(100vh - 52px));
  aspect-ratio:1/1;
  padding:0;
  border-radius:24px;
  overflow:hidden;
  background:
    radial-gradient(ellipse 35% 42% at 5% 0%,rgba(205,168,255,.92) 0%,rgba(205,168,255,.56) 38%,transparent 70%),
    radial-gradient(ellipse 38% 44% at 100% 0%,rgba(119,220,255,.84) 0%,rgba(119,220,255,.45) 38%,transparent 70%),
    radial-gradient(ellipse 38% 44% at 0% 100%,rgba(101,216,255,.76) 0%,rgba(101,216,255,.38) 40%,transparent 72%),
    radial-gradient(ellipse 38% 44% at 100% 100%,rgba(207,171,255,.82) 0%,rgba(207,171,255,.42) 40%,transparent 72%),
    linear-gradient(135deg,#fbfcff 0%,#f0f4ff 52%,#edf8ff 100%);
  border:1px solid rgba(255,255,255,.92);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 24px 60px rgba(75,86,160,.18),0 4px 16px rgba(103,193,235,.10);
}

/* Glowing star border - widened inner notches so the outer arm sockets and marbles remain fully visible. */
.board-shell::before{
  content:"";
  position:absolute;
  inset:1.6%;
  z-index:0;
  clip-path:polygon(
    50% 0%,67% 22%,100% 25%,81.5% 50%,100% 75%,67% 78%,
    50% 100%,33% 78%,0% 75%,18.5% 50%,0% 25%,33% 22%
  );
  background:
    linear-gradient(145deg,#7be1ff 0%,#55c7ff 34%,#747dff 67%,#b56bff 100%);
  filter:drop-shadow(0 7px 10px rgba(83,109,221,.22)) drop-shadow(0 0 7px rgba(93,202,255,.16));
}

.board{
  position:absolute;
  inset:1.9%;
  width:auto;
  height:auto;
  z-index:1;
  overflow:visible;
  clip-path:none;
  background:transparent;
  box-shadow:none;
}

/* Keep the star surface clipped, but never clip the 121 sockets/marbles. */
.board::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
  clip-path:polygon(
    50% 0%,67% 22%,100% 25%,81.5% 50%,100% 75%,67% 78%,
    50% 100%,33% 78%,0% 75%,18.5% 50%,0% 25%,33% 22%
  );
  background:
    radial-gradient(circle at 44% 10%,rgba(255,255,255,.98),transparent 28%),
    radial-gradient(circle at 68% 78%,rgba(218,227,255,.44),transparent 34%),
    linear-gradient(145deg,#ffffff 0%,#f9fbff 44%,#edf3fb 100%);
  box-shadow:inset 0 0 30px rgba(105,157,205,.10);
}

.hole{
  position:absolute;
  z-index:2;
  width:clamp(17px,3.05%,35px);
  aspect-ratio:1;
  transform:translate(-50%,-50%);
  padding:0;border:0;border-radius:50%;
  cursor:pointer;
  background:
    radial-gradient(circle at 38% 30%,#ffffff 0%,#e7f0f8 35%,#b8c9dc 72%,#92a5bb 100%);
  box-shadow:
    inset 0 4px 7px rgba(56,82,111,.28),
    inset 0 -1px 2px rgba(255,255,255,.9),
    0 2px 3px rgba(71,104,137,.16);
  transition:transform .12s,filter .12s,box-shadow .12s;
}
.hole:hover{transform:translate(-50%,-50%) scale(1.06);filter:brightness(1.04)}
.hole.selected{
  box-shadow:0 0 0 4px #fff,0 0 0 7px rgba(124,58,237,.82),0 0 22px rgba(124,58,237,.36),inset 0 4px 7px rgba(56,82,111,.28)
}
.hole.valid{
  box-shadow:0 0 0 3px rgba(255,255,255,.95),0 0 13px rgba(103,207,255,.38),inset 0 4px 7px rgba(56,82,111,.28)
}
.hole.jump-valid{
  box-shadow:0 0 0 4px var(--orange),0 0 12px rgba(244,182,45,.40),inset 0 4px 7px rgba(56,82,111,.28)
}
.hole.camp-purple,.hole.camp-gold,.hole.camp-blue,.hole.camp-pink{
  background:radial-gradient(circle,#dceaf6,#b8cbdc 72%,#91a8bd)
}
.hole.marble-purple::after,.hole.marble-orange::after,.hole.marble-blue::after,.hole.marble-pink::after,.hole.marble-coral::after,.hole.marble-teal::after{content:"";position:absolute;inset:6%;border-radius:50%}
.hole.marble-purple::after{
  background:radial-gradient(circle at 32% 26%,#cbb1ff,#7c3aed 34%,#4c1d95 70%,#2a0b59);
  box-shadow:inset -6px -8px 10px rgba(0,0,0,.28),inset 6px 5px 8px rgba(255,255,255,.24),0 5px 8px rgba(55,38,105,.34)
}
.hole.marble-orange::after{
  background:radial-gradient(circle at 32% 26%,#fff0aa,#f6b92d 34%,#c77700 70%,#7a3d00);
  box-shadow:inset -6px -8px 10px rgba(0,0,0,.24),inset 6px 5px 8px rgba(255,255,255,.24),0 5px 8px rgba(100,67,18,.30)
}

.side{min-width:0}
.panel{
  border:1px solid rgba(255,255,255,.95);
  border-radius:20px;
  background:linear-gradient(145deg,rgba(255,255,255,.84),rgba(249,248,255,.66));
  padding:15px;
  box-shadow:0 18px 44px rgba(72,79,151,.12),inset 0 1px 0 rgba(255,255,255,.96);
  backdrop-filter:blur(14px);
}
.eyebrow{display:block;color:#8d43ee;font-size:.67rem;font-weight:950;letter-spacing:.13em}
h1{margin:6px 0 5px;font-size:clamp(1.45rem,3vw,2.1rem);letter-spacing:-.035em}
.sub{margin:0;color:var(--muted);font-size:.78rem;line-height:1.45}

.turn-card{
  margin-top:15px;
  min-height:88px;
  padding:14px 16px;
  border:1px solid rgba(255,255,255,.95);
  border-radius:16px;
  background:linear-gradient(135deg,rgba(255,255,255,.86),rgba(243,248,255,.72));
  box-shadow:0 8px 22px rgba(71,114,168,.08),inset 0 1px 0 rgba(255,255,255,.9);
  display:flex;align-items:center;justify-content:space-between;gap:12px;
}
.label{display:block;color:#65799a;font-size:.67rem;font-weight:900}
#turn{display:block;margin-top:3px;font-size:1.45rem;line-height:1;color:var(--purple);letter-spacing:-.03em}
#turn.orange-turn{color:#c57a00}
#hint{display:block;margin-top:5px;color:var(--muted);font-size:.75rem}
.turn-marble{width:42px;height:42px;flex:0 0 42px;border-radius:50%;box-shadow:inset -7px -8px 10px rgba(0,0,0,.22),inset 6px 5px 8px rgba(255,255,255,.25),0 8px 18px rgba(81,71,154,.25)}
.turn-marble.purple{background:radial-gradient(circle at 30% 24%,#d5c0ff,#7c3aed 36%,#4c1d95 72%,#2a0b59)}

.legend{
  display:flex;flex-wrap:wrap;gap:10px 18px;margin:12px 0;padding:2px 4px;
  font-weight:850;font-size:.78rem;color:#273957
}
.legend i{display:inline-block;width:18px;height:18px;border-radius:50%;vertical-align:-4px;margin-right:7px;box-shadow:inset 2px 2px 4px rgba(255,255,255,.45),0 2px 5px rgba(51,74,103,.16)}
.legend .purple{background:linear-gradient(145deg,#9b65ff,#6121d4)}
.legend .orange{background:linear-gradient(145deg,#ffd86b,#e79b10)}

.rules{
  padding:13px 14px;
  border:1px solid rgba(255,255,255,.96);
  border-radius:15px;
  background:rgba(255,255,255,.62);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
  font-size:.77rem;line-height:1.42;
}
.rules>b{font-size:.9rem}
.rules ol{list-style:none;margin:9px 0 0;padding:0;display:grid;gap:8px}
.rules li{display:grid;grid-template-columns:26px 1fr;align-items:start;gap:9px}
.rules li>span{
  display:grid;place-items:center;width:26px;height:26px;border-radius:50%;
  color:#6c35d8;background:linear-gradient(145deg,#efe5ff,#d8c6ff);font-weight:950;font-size:.72rem;
}
.rules p{margin:2px 0 0;color:#617493}

.new-game{
  width:100%;min-height:50px;margin-top:14px;border:0;border-radius:14px;
  color:#fff;background:linear-gradient(100deg,#b85cff 0%,#7c5cf2 48%,#249fe8 100%);font-weight:900;cursor:pointer;
  box-shadow:0 12px 24px rgba(108,78,220,.22),inset 0 1px 0 rgba(255,255,255,.30);
  transition:transform .12s,filter .12s,box-shadow .12s;
}
.new-game:hover{transform:translateY(-1px);filter:brightness(1.04);box-shadow:0 14px 28px rgba(108,78,220,.28)}
.refresh-icon{display:inline-block;font-size:1.35rem;line-height:0;vertical-align:-2px;margin-right:8px}
.status{min-height:20px;margin:10px 2px 0;color:var(--muted);font-size:.74rem}

.modal{position:fixed;inset:0;display:grid;place-items:center;visibility:hidden;opacity:0;z-index:20;transition:.18s}
.modal.open{visibility:visible;opacity:1}
.backdrop{position:absolute;inset:0;background:rgba(35,50,75,.38);backdrop-filter:blur(8px)}
.dialog{position:relative;width:min(92%,420px);padding:26px;border-radius:24px;background:rgba(255,255,255,.94);text-align:center;box-shadow:0 25px 70px rgba(42,72,112,.25)}
.dialog h2{margin:7px 0}.dialog p{color:var(--muted)}

.finish-jump{width:100%;min-height:42px;margin-top:10px;border:2px solid #f59e0b;border-radius:14px;background:#fff7df;color:#8a5200;font-weight:900;cursor:pointer}
.finish-jump[hidden]{display:none}

/* V1.3 — jump animation, preserved */
.hole.marble-hidden-during-jump::after{opacity:0}
.hole.jumped-over{animation:jumpedOver .42s ease-in-out;z-index:5}
@keyframes jumpedOver{
  0%,100%{filter:brightness(1);transform:translate(-50%,-50%) scale(1)}
  45%{filter:brightness(1.65);transform:translate(-50%,-50%) scale(1.16)}
}
.jump-marble{position:absolute;z-index:15;width:clamp(17px,3.05%,35px);aspect-ratio:1;border-radius:50%;pointer-events:none;transform:translate(-50%,-50%);will-change:left,top,transform}
.jump-marble.marble-purple{background:radial-gradient(circle at 32% 26%,#cbb1ff,#7c3aed 34%,#4c1d95 70%,#2a0b59);box-shadow:inset -6px -8px 10px rgba(0,0,0,.28),inset 6px 5px 8px rgba(255,255,255,.22),0 7px 12px rgba(55,38,105,.40)}
.jump-marble.marble-orange{background:radial-gradient(circle at 32% 26%,#fff0aa,#f6b92d 34%,#c77700 70%,#7a3d00);box-shadow:inset -6px -8px 10px rgba(0,0,0,.24),inset 6px 5px 8px rgba(255,255,255,.22),0 7px 12px rgba(100,67,18,.35)}

@media(max-width:980px){
  .app{grid-template-columns:1fr;grid-template-rows:auto auto;height:auto;min-height:0}
  .game-area{order:1;height:auto;min-height:0}
  .side{order:2}
  .board-shell{width:min(100%,calc(100vw - 28px));flex:none}
}
@media(max-width:600px){
  html,body{padding:0;margin:0;min-height:100%;overflow-x:hidden}
  body{background:
    radial-gradient(ellipse 70% 30% at 0% 0%,rgba(206,171,255,.62) 0%,transparent 70%),
    radial-gradient(ellipse 70% 30% at 100% 0%,rgba(132,221,255,.55) 0%,transparent 70%),
    linear-gradient(135deg,#fafbff 0%,#f1f5ff 52%,#eef7ff 100%)}
  .app{width:100%;height:auto;min-height:100vh;margin:0;padding:10px;display:flex;flex-direction:column;gap:12px}
  .game-area{order:1;width:100%;height:auto;display:block;min-height:0}
  .board-shell{width:min(94vw,560px);height:auto;aspect-ratio:1/1;margin:0 auto;border-radius:22px}
  .side{order:2;width:100%}
  .panel{width:100%;padding:14px;border-radius:20px}
  .panel h1{font-size:1.65rem;margin-top:2px}
  .sub{font-size:.74rem}
  .mode-picker{margin-top:12px}
  .mode-buttons{gap:6px}
  .mode-btn{min-height:40px;font-size:.8rem}
  .turn-card{min-height:78px;margin-top:11px;padding:12px 13px}
  #turn{font-size:1.3rem}
  .turn-marble{width:38px;height:38px;flex-basis:38px}
  .legend{gap:8px 14px;margin:10px 0;font-size:.74rem}
  .legend i{width:16px;height:16px}
  .meti-tip-card{grid-template-columns:minmax(0,1fr) 82px;min-height:124px;margin-top:10px;padding:12px 10px 10px 12px}
  .meti-tip-title{font-size:.82rem;margin-bottom:6px}
  .meti-tip-copy p{font-size:.69rem;line-height:1.42;padding:9px 10px}
  .meti-tip-image{width:96px;height:96px;margin:-2px -8px -10px 0}
  .quick-info{margin-top:9px;padding:11px 12px}
  .quick-info p{font-size:.68rem}
  .new-game{min-height:48px;margin-top:11px}
  .status{margin-bottom:2px}
}

/* 4 oyunculu mod */
.mode-picker{margin-top:14px;padding:10px;border:1px solid rgba(124,58,237,.12);border-radius:16px;background:rgba(255,255,255,.62);box-shadow:0 6px 18px rgba(80,72,140,.06)}
.mode-title{display:block;color:#6f7c99;font-size:.62rem;font-weight:950;letter-spacing:.12em;margin-bottom:7px}
.mode-buttons{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}
.mode-btn{min-height:36px;border:1px solid #dce3f2;border-radius:11px;background:rgba(255,255,255,.72);color:#53617e;font-weight:850;cursor:pointer;transition:.15s}
.mode-btn:hover{transform:translateY(-1px);border-color:#b7a2ff}
.mode-btn.active{color:#fff;border-color:transparent;background:linear-gradient(135deg,#9a62ff,#5d8cff);box-shadow:0 7px 15px rgba(104,78,220,.2)}
#turn.turn-purple{color:#7c3aed}
#turn.turn-orange{color:#c57a00}
#turn.turn-blue{color:#258fce}
#turn.turn-pink{color:#d052a6}
.turn-marble.orange,.legend .orange{background:linear-gradient(145deg,#ffd86b,#e79b10)}
.turn-marble.blue,.legend .blue{background:linear-gradient(145deg,#70d8ff,#258fce)}
.turn-marble.pink,.legend .pink{background:linear-gradient(145deg,#ff9ed4,#d052a6)}
.hole.marble-blue::after{background:radial-gradient(circle at 32% 26%,#b7efff,#35aee8 34%,#1476ae 70%,#0a4569);box-shadow:inset -6px -8px 10px rgba(0,0,0,.22),inset 6px 5px 8px rgba(255,255,255,.24),0 4px 7px rgba(25,113,165,.32)}
.hole.marble-pink::after{background:radial-gradient(circle at 32% 26%,#ffd0ed,#f06ab7 34%,#c03d8e 70%,#7b205d);box-shadow:inset -6px -8px 10px rgba(0,0,0,.22),inset 6px 5px 8px rgba(255,255,255,.24),0 4px 7px rgba(168,55,126,.30)}
.legend .blue{background:linear-gradient(145deg,#8ce3ff,#2799d2)}
.legend .pink{background:linear-gradient(145deg,#ffb5df,#d85aa9)}
.hole.camp-blue,.hole.camp-pink{background:radial-gradient(circle,#dbeaff,#b5cde3 72%,#91aecb)}
.jump-marble.marble-blue{background:radial-gradient(circle at 32% 26%,#c7f4ff,#35aee8 34%,#1476ae 70%,#0a4569);box-shadow:inset -6px -8px 10px rgba(0,0,0,.28),inset 6px 5px 8px rgba(255,255,255,.22),0 7px 12px rgba(25,113,165,.35)}
.jump-marble.marble-pink{background:radial-gradient(circle at 32% 26%,#ffd7ef,#f06ab7 34%,#c03d8e 70%,#7b205d);box-shadow:inset -6px -8px 10px rgba(0,0,0,.28),inset 6px 5px 8px rgba(255,255,255,.22),0 7px 12px rgba(168,55,126,.35)}
.turn-marble{flex:0 0 auto}

/* 6 oyunculu mod renkleri */
.turn-marble.coral,.legend .coral{background:linear-gradient(145deg,#f49a78,#d95d39)}
.turn-marble.teal,.legend .teal{background:linear-gradient(145deg,#65e6df,#159caa)}
#turn.turn-coral{color:#c94f32}
#turn.turn-teal{color:#168f9d}
.hole.marble-coral::after{background:radial-gradient(circle at 32% 26%,#ffd0c2,#e76f51 34%,#c84f32 70%,#7a2f1d);box-shadow:inset -6px -8px 10px rgba(0,0,0,.22),inset 6px 5px 8px rgba(255,255,255,.24),0 4px 7px rgba(168,55,40,.30)}
.hole.marble-teal::after{background:radial-gradient(circle at 32% 26%,#b9fff9,#31c7c5 34%,#15959e 70%,#075963);box-shadow:inset -6px -8px 10px rgba(0,0,0,.22),inset 6px 5px 8px rgba(255,255,255,.24),0 4px 7px rgba(25,133,145,.30)}
.legend .coral{background:linear-gradient(145deg,#ffae8f,#d95d39)}
.legend .teal{background:linear-gradient(145deg,#7beee7,#159caa)}
.hole.camp-coral,.hole.camp-teal{background:radial-gradient(circle,#dbeaff,#b5cde3 72%,#91aecb)}
.jump-marble.marble-coral{background:radial-gradient(circle at 32% 26%,#ffd8c9,#e76f51 34%,#c84f32 70%,#7a2f1d);box-shadow:inset -6px -8px 10px rgba(0,0,0,.28),inset 6px 5px 8px rgba(255,255,255,.22),0 7px 12px rgba(168,55,40,.35)}
.jump-marble.marble-teal{background:radial-gradient(circle at 32% 26%,#c8fffb,#31c7c5 34%,#15959e 70%,#075963);box-shadow:inset -6px -8px 10px rgba(0,0,0,.28),inset 6px 5px 8px rgba(255,255,255,.22),0 7px 12px rgba(25,133,145,.35)}

/* V2.6 — oyun başlamadan önce renk ve hamle sırası seçimi */
.setup-modal{
  position:fixed;inset:0;z-index:50;display:grid;place-items:center;
  padding:18px;visibility:hidden;opacity:0;pointer-events:none;transition:.18s ease;
}
.setup-modal.open{visibility:visible;opacity:1;pointer-events:auto}
.setup-backdrop{position:absolute;inset:0;background:rgba(35,45,82,.38);backdrop-filter:blur(10px)}
.setup-dialog{
  position:relative;width:min(94vw,560px);padding:28px;border-radius:28px;
  border:1px solid rgba(255,255,255,.96);
  background:linear-gradient(145deg,rgba(255,255,255,.96),rgba(246,247,255,.90));
  box-shadow:0 28px 80px rgba(54,56,122,.28),inset 0 1px 0 rgba(255,255,255,.98);
  text-align:center;
}
.setup-dialog h2{margin:7px 0 7px;font-size:clamp(1.5rem,4vw,2rem);letter-spacing:-.035em}
.setup-dialog>p{margin:0 auto 18px;max-width:450px;color:var(--muted);font-size:.84rem;line-height:1.5}
.setup-colors{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.setup-color{
  position:relative;min-height:76px;padding:10px 8px;border:1px solid #dce3f2;border-radius:16px;
  background:rgba(255,255,255,.82);color:#273957;cursor:pointer;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;
  box-shadow:0 5px 14px rgba(75,88,135,.06);transition:.14s ease;
}
.setup-color:hover{transform:translateY(-2px);border-color:#bba5ff;box-shadow:0 9px 18px rgba(91,77,180,.12)}
.setup-color.chosen{border-color:#8d68f5;background:linear-gradient(145deg,#f7f2ff,#eef5ff);box-shadow:0 0 0 2px rgba(124,58,237,.12),0 9px 20px rgba(91,77,180,.12)}
.setup-color>b{position:absolute;right:8px;top:7px;display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#7c3aed;color:#fff;font-size:.7rem}
.setup-color strong{font-size:.78rem}
.setup-marble{width:27px;height:27px;border-radius:50%;display:inline-block;box-shadow:inset -5px -6px 8px rgba(0,0,0,.22),inset 4px 4px 6px rgba(255,255,255,.28),0 4px 8px rgba(60,70,110,.22)}
.setup-marble.purple,.turn-marble.purple{background:radial-gradient(circle at 30% 24%,#d5c0ff,#7c3aed 36%,#4c1d95 72%,#2a0b59)}
.setup-marble.pink,.turn-marble.pink{background:radial-gradient(circle at 30% 24%,#ffd4e7,#ec72ae 36%,#a73572 72%,#6c1745)}
.setup-marble.coral,.turn-marble.coral{background:radial-gradient(circle at 30% 24%,#ffd8c9,#e76f51 36%,#c84f32 72%,#7a2f1d)}
.setup-marble.orange,.turn-marble.orange{background:radial-gradient(circle at 30% 24%,#fff0aa,#f6b92d 36%,#c77700 72%,#7a3d00)}
.setup-marble.blue,.turn-marble.blue{background:radial-gradient(circle at 30% 24%,#c8f1ff,#39aee0 36%,#1674a9 72%,#0b456a)}
.setup-marble.teal,.turn-marble.teal{background:radial-gradient(circle at 30% 24%,#c9fff9,#37c4c4 36%,#168d99 72%,#0b5660)}
.setup-order-wrap{margin-top:18px;padding:13px;border:1px solid rgba(255,255,255,.96);border-radius:16px;background:rgba(241,245,255,.66)}
.setup-order-label{display:block;color:#73809b;font-size:.62rem;font-weight:950;letter-spacing:.12em;margin-bottom:9px}
.setup-order{min-height:38px;display:flex;flex-wrap:wrap;justify-content:center;gap:7px}
.setup-order-item{display:flex;align-items:center;gap:5px;padding:5px 8px 5px 5px;border-radius:999px;background:#fff;border:1px solid #e2e7f1;font-size:.7rem;color:#334361}
.setup-order-item .setup-marble{width:20px;height:20px}.order-number{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#eee8ff;color:#6636ce;font-weight:950;font-size:.65rem}
.start-game{
  width:100%;min-height:50px;margin-top:15px;border:0;border-radius:15px;color:#fff;font-weight:900;cursor:pointer;
  background:linear-gradient(100deg,#b85cff 0%,#7c5cf2 48%,#249fe8 100%);box-shadow:0 12px 24px rgba(108,78,220,.22),inset 0 1px 0 rgba(255,255,255,.3);transition:.14s ease
}
.start-game:hover:not(:disabled){transform:translateY(-1px);filter:brightness(1.04)}
.start-game:disabled{cursor:not-allowed;opacity:.42;box-shadow:none}

/* 4/6 oyunculu taş renkleri */
.hole.marble-pink::after{background:radial-gradient(circle at 32% 26%,#ffd4e7,#ec72ae 34%,#a73572 70%,#6c1745);box-shadow:inset -6px -8px 10px rgba(0,0,0,.24),inset 6px 5px 8px rgba(255,255,255,.24),0 5px 8px rgba(100,40,82,.30)}
.hole.marble-blue::after{background:radial-gradient(circle at 32% 26%,#c8f1ff,#39aee0 34%,#1674a9 70%,#0b456a);box-shadow:inset -6px -8px 10px rgba(0,0,0,.24),inset 6px 5px 8px rgba(255,255,255,.24),0 5px 8px rgba(25,91,125,.30)}
.hole.marble-coral::after{background:radial-gradient(circle at 32% 26%,#ffd8c9,#e76f51 34%,#c84f32 70%,#7a2f1d);box-shadow:inset -6px -8px 10px rgba(0,0,0,.24),inset 6px 5px 8px rgba(255,255,255,.24),0 5px 8px rgba(120,50,42,.30)}
.hole.marble-teal::after{background:radial-gradient(circle at 32% 26%,#c9fff9,#37c4c4 34%,#168d99 70%,#0b5660);box-shadow:inset -6px -8px 10px rgba(0,0,0,.24),inset 6px 5px 8px rgba(255,255,255,.24),0 5px 8px rgba(20,100,105,.30)}
.turn-marble.pink,.turn-marble.coral,.turn-marble.blue,.turn-marble.teal{box-shadow:inset -7px -8px 10px rgba(0,0,0,.22),inset 6px 5px 8px rgba(255,255,255,.25),0 8px 18px rgba(81,71,154,.25)}
.legend .pink{background:linear-gradient(145deg,#ff9bca,#d95399)}
.legend .coral{background:linear-gradient(145deg,#ffae8f,#d95d39)}
.legend .blue{background:linear-gradient(145deg,#74d8ff,#258ec6)}
.legend .teal{background:linear-gradient(145deg,#65dedb,#1d9fa5)}
#turn.turn-pink{color:#d64c98}#turn.turn-coral{color:#c94f32}#turn.turn-teal{color:#168f98}

@media(max-width:600px){
  .setup-dialog{padding:22px 16px;border-radius:22px}
  .setup-colors{gap:7px}.setup-color{min-height:68px}
  .setup-order-wrap{margin-top:12px}
}

/* V3.0 — Meti'ye karşı oyun modu */
.setup-mode-tabs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin:16px 0 14px;
  padding:5px;
  border:1px solid #e0e5f2;
  border-radius:15px;
  background:rgba(241,244,252,.82);
}
.setup-mode-tab{
  min-height:42px;
  border:0;
  border-radius:11px;
  background:transparent;
  color:#586782;
  font-weight:900;
  cursor:pointer;
  transition:.14s ease;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
}
.meti-tab-icon{
  width:27px;
  height:27px;
  object-fit:contain;
  flex:0 0 27px;
  filter:drop-shadow(0 3px 4px rgba(53,38,104,.18));
}
.setup-mode-tab.active .meti-tab-icon{
  filter:drop-shadow(0 3px 5px rgba(37,24,96,.25));
}
.setup-mode-tab:hover{background:rgba(255,255,255,.72);color:#3e4d6c}
.setup-mode-tab.active{
  color:#fff;
  background:linear-gradient(135deg,#8b45ef,#5f82f4);
  box-shadow:0 7px 16px rgba(105,76,220,.22);
}
.bot-options{margin-bottom:10px}
.bot-options[hidden]{display:none}
.setup-section-label{
  display:block;
  margin:4px 0 8px;
  color:#73809b;
  font-size:.62rem;
  font-weight:950;
  letter-spacing:.12em;
}
.bot-levels{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  margin-bottom:14px;
}
.bot-level{
  min-height:64px;
  padding:9px 7px;
  border:1px solid #dce3f2;
  border-radius:13px;
  background:rgba(255,255,255,.78);
  color:#30415f;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  transition:.14s ease;
}
.bot-level:hover{transform:translateY(-1px);border-color:#bba5ff}
.bot-level.active{
  border-color:#8d68f5;
  background:linear-gradient(145deg,#f7f2ff,#eef5ff);
  box-shadow:0 0 0 2px rgba(124,58,237,.10),0 8px 18px rgba(91,77,180,.10);
  color:#6135c9;
}
.bot-level b{font-size:.72rem}
.bot-level small{font-size:.58rem;color:#7b89a3;font-weight:700}

@media(max-width:600px){
  .setup-mode-tabs{margin-top:12px}
  .bot-levels{gap:6px}
  .bot-level{min-height:58px;padding:7px 4px}
  .bot-level b{font-size:.66rem}
  .bot-level small{font-size:.52rem}
}


/* V3.4 — Meti ipucu, sonuç kartı ve konfeti */
.meti-tip-card{
  position:relative;display:grid;grid-template-columns:minmax(0,1fr) 96px;gap:8px;
  min-height:142px;margin-top:12px;padding:14px 12px 12px 14px;overflow:hidden;
  border-radius:16px;border:1px solid rgba(255,255,255,.96);
  background:linear-gradient(135deg,rgba(124,58,237,.94),rgba(96,105,245,.90));
  box-shadow:0 12px 28px rgba(91,67,184,.18),inset 0 1px 0 rgba(255,255,255,.35);
}
.meti-tip-copy{position:relative;z-index:2;align-self:center}
.meti-tip-title{color:#fff;font-weight:950;font-size:.88rem;margin-bottom:8px;display:flex;align-items:center;gap:7px}
.tip-icon{width:25px;height:25px;border-radius:8px;display:grid;place-items:center;background:rgba(255,255,255,.18);font-size:.95rem}
.meti-tip-copy p{margin:0;padding:11px 12px;border-radius:12px;background:rgba(255,255,255,.96);color:#536684;font-size:.72rem;line-height:1.48;box-shadow:0 5px 15px rgba(41,38,90,.12)}
.meti-tip-image{width:112px;height:112px;object-fit:contain;align-self:end;justify-self:end;margin:-3px -8px -11px 0;filter:drop-shadow(0 8px 9px rgba(41,30,86,.22));transform:translateY(2px)}
.quick-info{margin-top:10px;padding:12px 13px;border-radius:15px;border:1px solid rgba(255,255,255,.96);background:rgba(255,255,255,.62);box-shadow:inset 0 1px 0 rgba(255,255,255,.9)}
.quick-info-title{display:flex;align-items:center;gap:7px;color:#465a7c;font-size:.82rem;font-weight:950;margin-bottom:5px}.quick-info-title span{color:#7c3aed;font-size:1rem}.quick-info p{margin:0;color:#71819d;font-size:.7rem;line-height:1.4}

.result-dialog{width:min(94%,680px);display:grid;grid-template-columns:190px 1fr;gap:18px;align-items:center;padding:24px 24px 24px 18px;text-align:left;overflow:hidden}
.result-meti-wrap{min-height:240px;display:grid;place-items:end center;align-self:stretch;background:radial-gradient(circle at 50% 50%,rgba(224,211,255,.55),transparent 68%);border-radius:18px}
.result-meti-image{width:205px;height:205px;object-fit:contain;filter:drop-shadow(0 14px 14px rgba(62,45,122,.20));animation:metiResultPop .48s cubic-bezier(.2,.8,.2,1)}
.result-copy h2{font-size:clamp(1.55rem,4vw,2.1rem);margin:7px 0 8px;letter-spacing:-.035em}.result-copy p{margin:0;color:var(--muted);line-height:1.5}
.result-meti-message{margin:14px 0 14px;padding:11px 13px;border-radius:13px;background:linear-gradient(145deg,#f1e9ff,#eef7ff);border:1px solid #e0d5ff;color:#5e4a88;font-size:.76rem;font-weight:750;line-height:1.45}
.result-copy .new-game{margin-top:0}
@keyframes metiResultPop{from{opacity:0;transform:translateY(15px) scale(.86)}to{opacity:1;transform:translateY(0) scale(1)}}

.confetti-layer{position:fixed;inset:0;z-index:80;pointer-events:none;overflow:hidden}
.confetti-piece{position:absolute;top:-24px;width:9px;height:15px;border-radius:3px;opacity:0;animation:confettiFall var(--duration) cubic-bezier(.15,.75,.25,1) forwards;transform:rotate(var(--rotation));}
@keyframes confettiFall{0%{opacity:0;transform:translate3d(0,-20px,0) rotate(0deg)}10%{opacity:1}100%{opacity:1;transform:translate3d(var(--drift),105vh,0) rotate(var(--spin))}}
@media(max-width:600px){
  .meti-tip-card{grid-template-columns:minmax(0,1fr) 76px;min-height:128px}.meti-tip-image{width:94px;height:94px}
  .result-dialog{grid-template-columns:1fr;gap:2px;text-align:center;padding:18px}.result-meti-wrap{min-height:150px}.result-meti-image{width:155px;height:155px}.result-copy .new-game{margin-top:0}.result-meti-message{text-align:left}
}
