﻿.textbottom {
	background-color: #FFFFFF;
	color: #000000;
}

  * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
  html, body {
    margin: 0; padding: 0; height: 100%;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    background: radial-gradient(circle at 50% 0%, #2b3a55, #10151f 80%);
    color: #e8eef7;
    overflow: hidden;
    user-select: none;
  }
  #app {
    display: flex; flex-direction: column;
    height: 100%; width: 100%;
    max-width: 700px; margin: 0 auto;
    padding: 6px;
  }
  header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 4px 8px; gap: 8px; flex-wrap: wrap;
  }
  .stat {
    background: rgba(255,255,255,0.07);
    border-radius: 10px; padding: 6px 12px;
    font-size: clamp(12px, 3.5vw, 16px);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
    white-space: nowrap;
  }
  .stat b { color: #ffd166; font-size: 1.15em; }
  .combo { color: #7CFC98; }
  .icon-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #e8eef7;
    border-radius: 10px;
    padding: 6px 12px;
    font-size: clamp(12px, 3.5vw, 15px);
    font-weight: 600;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
    white-space: nowrap;
    transition: background .15s;
  }
  .icon-btn:hover { background: rgba(255,255,255,0.18); }
  .icon-btn:active { background: rgba(255,255,255,0.25); }
  #boardWrap {
    flex: 1 1 auto; position: relative;
    display: flex; align-items: center; justify-content: center;
    min-height: 0;
  }
  #board { position: relative; touch-action: none; }
  #grid {
    position: absolute; inset: 0;
    display: grid;
    background: rgba(0,0,0,0.25);
    border-radius: 12px;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.12), 0 10px 30px rgba(0,0,0,0.5);
    overflow: hidden;
  }
  .cell {
    border: 1px solid rgba(255,255,255,0.06);
    position: relative;
  }
  #balls { position: absolute; inset: 0; pointer-events: none; }
  .ball {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    transition: left .12s ease, top .12s ease, opacity .2s ease;
    will-change: left, top;
    box-shadow: inset -3px -3px 8px rgba(0,0,0,0.35), inset 3px 3px 6px rgba(255,255,255,0.35), 0 2px 6px rgba(0,0,0,0.4);
  }
  .ball.sel {
    z-index: 10;
    transform: scale(1.18);
    animation: selPulse .7s ease-in-out infinite alternate;
  }
  @keyframes selPulse {
    from {
      box-shadow:
        0 0 0 3px #fff,
        0 0 0 6px #7CFC98,
        0 0 14px 6px rgba(124,252,152,0.7),
        inset -3px -3px 8px rgba(0,0,0,0.35),
        inset 3px 3px 6px rgba(255,255,255,0.35);
    }
    to {
      box-shadow:
        0 0 0 3px #fff,
        0 0 0 8px #7CFC98,
        0 0 26px 12px rgba(124,252,152,1),
        inset -3px -3px 8px rgba(0,0,0,0.35),
        inset 3px 3px 6px rgba(255,255,255,0.35);
    }
  }
  .ball.spawn { animation: spawnIn .25s ease; }
  @keyframes spawnIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
  }
  .ball.dying { animation: die .3s ease forwards; }
  @keyframes die { to { transform: scale(0); opacity: 0; } }

  .popup {
    position: absolute;
    pointer-events: none;
    font-weight: 800;
    color: #ffd166;
    text-shadow:
      0 0 8px rgba(255,209,102,0.9),
      0 0 20px rgba(255,209,102,0.6),
      0 2px 4px rgba(0,0,0,0.8);
    transform: translate(-50%, -50%);
    z-index: 20;
    animation: popupRise 1.1s ease-out forwards;
    white-space: nowrap;
  }
  @keyframes popupRise {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.5);
    }
    20% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1.15);
    }
    40% {
      transform: translate(-50%, -70%) scale(1);
    }
    100% {
      opacity: 0;
      transform: translate(-50%, -180%) scale(1);
    }
  }
  .popup.big {
    color: #ff9d3d;
    font-size: 2.2em;
    text-shadow:
      0 0 10px rgba(255,157,61,1),
      0 0 30px rgba(255,100,0,0.8),
      0 2px 6px rgba(0,0,0,0.9);
  }
  .popup.huge {
    color: #ff4d4d;
    font-size: 2.6em;
    text-shadow:
      0 0 12px rgba(255,77,77,1),
      0 0 36px rgba(255,36,50,0.9),
      0 2px 8px rgba(0,0,0,1);
    animation: popupRiseHuge 1.3s ease-out forwards;
  }
  @keyframes popupRiseHuge {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4) rotate(-6deg); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1.3) rotate(3deg); }
    40% { transform: translate(-50%, -80%) scale(1.1) rotate(-2deg); }
    100% { opacity: 0; transform: translate(-50%, -220%) scale(1.1) rotate(0deg); }
  }

  .overlay {
    position: fixed; inset: 0;
    background: rgba(8,12,20,0.82);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    padding: 16px; z-index: 50;
    opacity: 0; pointer-events: none; transition: opacity .25s;
  }
  .overlay.show { opacity: 1; pointer-events: auto; }
  .panel_main {
    background: linear-gradient(180deg, #23304a, #16202f);
    border-radius: 18px;
    padding: 20px clamp(14px, 4vw, 28px);
    width: 100%;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.1), 0 20px 50px rgba(0,0,0,0.6);
    text-align: center;
    max-height: 90vh; overflow-y: auto;
  }
  .panel {
    background: linear-gradient(180deg, #23304a, #16202f);
    border-radius: 18px;
    padding: 20px clamp(14px, 4vw, 28px);
    width: 100%; max-width: 380px;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.1), 0 20px 50px rgba(0,0,0,0.6);
    text-align: center;
    max-height: 90vh; overflow-y: auto;
  }
  .panel h2 { margin: 0 0 12px; font-size: clamp(20px, 5vw, 26px); color: #ffd166; }
  .panel h3 { margin: 16px 0 8px; font-size: clamp(16px, 4vw, 20px); color: #7CFC98; }
  .score-big {
    font-size: clamp(32px, 10vw, 48px);
    font-weight: 800; color: #7CFC98;
    margin: 6px 0 14px;
    text-shadow: 0 0 18px rgba(124,252,152,0.5);
  }
  .records { margin: 12px 0; text-align: left; font-size: clamp(13px, 3.6vw, 15px); }
  .records .row {
    display: flex; justify-content: space-between;
    padding: 6px 10px; border-radius: 8px;
    margin-bottom: 4px;
    background: rgba(255,255,255,0.04);
  }
  .records .row.new {
    background: rgba(255,209,102,0.18);
    box-shadow: inset 0 0 0 1px #ffd166;
    animation: newRec 1.2s ease infinite alternate;
  }
  @keyframes newRec {
    from { background: rgba(255,209,102,0.14); }
    to   { background: rgba(255,209,102,0.32); }
  }
  .records .row .place { color: #9fb2cc; }
  .records .row .val { color: #ffd166; font-weight: 700; }
  .btn {
    display: inline-block;
    margin-top: 14px;
    padding: 12px 26px;
    font-size: clamp(15px, 4.2vw, 17px);
    font-weight: 700;
    color: #10151f;
    background: linear-gradient(180deg, #9fffb0, #4fd97a);
    border: none; border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 6px 0 #2b8f4d, 0 8px 18px rgba(0,0,0,0.4);
    transition: transform .08s, box-shadow .08s;
  }
  .btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #2b8f4d, 0 4px 10px rgba(0,0,0,0.4);
  }
  .btn.ghost {
    background: rgba(255,255,255,0.1);
    color: #e8eef7;
    box-shadow: 0 6px 0 rgba(0,0,0,0.3), 0 8px 18px rgba(0,0,0,0.3);
  }
  .btn.ghost:active {
    box-shadow: 0 2px 0 rgba(0,0,0,0.3), 0 4px 10px rgba(0,0,0,0.3);
  }
  .btn-row {
    display: flex; gap: 10px; justify-content: center;
    flex-wrap: wrap;
  }
  #hint {
    text-align: center;
    font-size: clamp(11px, 3.2vw, 13px);
    color: #8ba0bb; padding: 4px 8px 8px;
    min-height: 1.2em;
  }
.txt_left {
	text-align: left;
}
h1{
	font-size: medium;
	font-weight: bold;
	text-align: center;
}
A{
				color: #808080;
				font-weight: bold;
				text-decoration: underline;
}
A:hover{
				color: #000066;
				text-decoration: underline;
				background-color: #CCCCCC;
}
