/* ── Logo ── */
.logo-container {
    position: relative;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.game-logo {
    width: clamp(220px, 40vw, 420px);
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.5));
    animation: logoFloat 4s ease-in-out infinite;
}

.game-subtitle {
    font-size: clamp(0.95em, 2.5vw, 1.2em);
    color: rgba(255,255,255,0.75);
    margin: 0.5rem 0 0;
    font-weight: 500;
    letter-spacing: 1px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* ── Info Panel ── */
#info-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    width: min(960px, 95vw);
    margin-bottom: 1.5rem;
    padding: 1.75rem 2rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

#rules-container {
    flex: 1;
}

#rules-container h2 {
    color: #fff;
    margin: 0 0 0.75rem;
    font-size: 1.2em;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.9;
    text-align: center;
}

.rule-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 0.95em;
    color: rgba(255,255,255,0.85);
    border-left: 3px solid rgba(32,178,170,0.7);
    margin: 6px 0;
    background: rgba(255,255,255,0.05);
    border-radius: 0 8px 8px 0;
    transition: background 0.2s;
}

.rule-item:hover { background: rgba(255,255,255,0.1); }
.rule-icon { font-size: 1.1em; flex-shrink: 0; }

/* ── Stat Boxes ── */
.info-stats {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    flex-shrink: 0;
}

.stat-box {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 14px;
    padding: 14px 20px;
    text-align: center;
    min-width: 90px;
    backdrop-filter: blur(10px);
}

.stat-label {
    font-size: 0.75em;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.6em;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

/* ── Status Message ── */
#status-message {
    width: min(960px, 95vw);
    margin-bottom: 1rem;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 600;
    text-align: center;
    animation: fadeSlideIn 0.3s ease;
}

#status-message.selection-prompt-mode {
    background: linear-gradient(135deg, rgba(32,178,170,0.18), rgba(20,160,155,0.1));
    border: 1px solid rgba(32,178,170,0.45);
    color: rgba(255,255,255,0.92);
    backdrop-filter: blur(14px);
    box-shadow: 0 4px 20px rgba(32,178,170,0.18), inset 0 1px 0 rgba(255,255,255,0.08);
    letter-spacing: 0.3px;
}

#status-message.error {
    background: rgba(231,76,60,0.2);
    border: 1px solid rgba(231,76,60,0.5);
    color: #ff8a80;
}

#status-message.success {
    background: rgba(46,204,113,0.2);
    border: 1px solid rgba(46,204,113,0.5);
    color: #69f0ae;
}

/* ── Game Container ── */
#game-container {
    display: none;
    justify-content: center;
    align-items: flex-end;
    gap: clamp(28px, 4vw, 48px);
    padding: 2rem 2rem 2.5rem;
    background: rgba(0,0,0,0.35);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: inset 0 4px 12px rgba(0,0,0,0.4), 0 12px 40px rgba(0,0,0,0.3);
    width: min(1100px, 95vw);
    min-height: 340px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

/* ── Poles ── */
.pole-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    min-width: 100px;
}

.pole-label {
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.5);
    margin-top: 22px;
}

.pole-label.red    { color: #e74c3c; }
.pole-label.blue   { color: #3498db; }
.pole-label.green  { color: #2ecc71; }
.pole-label.yellow { color: #f1c40f; }
.pole-label.orange { color: #ff9100; }
.pole-label.purple { color: #9b59b6; }
.pole-label.indigo { color: #7c6fd4; }

.pole-wrap {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    position: relative;
}

.pole-base {
    width: 72px;
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(to bottom, #7f8c8d, #95a5a6);
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.pole {
    width: 12px;
    border-radius: 6px 6px 0 0;
    position: relative;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    padding: 8px 0 0;
    transition: box-shadow 0.2s ease;
    cursor: pointer;
}

.pole.red-target    { background: linear-gradient(to bottom, #e74c3c, #c0392b); }
.pole.blue-target   { background: linear-gradient(to bottom, #3498db, #2980b9); }
.pole.green-target  { background: linear-gradient(to bottom, #2ecc71, #27ae60); }
.pole.yellow-target { background: linear-gradient(to bottom, #f1c40f, #f39c12); }
.pole.orange-target { background: linear-gradient(to bottom, #ff9100, #e67e22); }
.pole.purple-target { background: linear-gradient(to bottom, #9b59b6, #8e44ad); }
.pole.indigo-target { background: linear-gradient(to bottom, #5C46B8, #4834A1); }

.pole.drop-target {
    box-shadow: 0 0 0 3px #2ecc71, 0 0 20px rgba(46,204,113,0.5);
}

.pole.invalid-target {
    box-shadow: 0 0 0 3px #e74c3c, 0 0 20px rgba(231,76,60,0.4);
}

/* ── Discs ── */
.disc {
    height: 30px;
    width: 80px;
    border-radius: 15px;
    cursor: grab;
    margin-bottom: 4px;
    position: relative;
    border: 2px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 10px rgba(0,0,0,0.35), inset 0 2px 4px rgba(255,255,255,0.15);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
}

.disc::before {
    content: '';
    position: absolute;
    top: 4px; left: 15%;
    width: 70%; height: 35%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.45), transparent);
    border-radius: 50%;
    pointer-events: none;
}

.disc:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.45); }
.disc.dragging { opacity: 0.35; transform: none; cursor: grabbing; }

.disc.red    { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.disc.blue   { background: linear-gradient(135deg, #3498db, #2980b9); }
.disc.green  { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.disc.yellow { background: linear-gradient(135deg, #f1c40f, #f39c12); }
.disc.orange { background: linear-gradient(135deg, #ff9100, #e67e22); }
.disc.purple { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
.disc.indigo { background: linear-gradient(135deg, #5C46B8, #4834A1); }

/* ── Drag Cursor ── */
#drag-cursor {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    width: 84px;
    height: 30px;
    border-radius: 15px;
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: 0 12px 30px rgba(0,0,0,0.6), inset 0 2px 4px rgba(255,255,255,0.15);
    transform: translate(-50%, -50%) rotate(6deg) scale(1.15);
    transition: none;
}

#drag-cursor.hidden { display: none !important; }

/* ── Difficulty Selector ── */
#controls { width: min(960px, 95vw); }

.difficulty-selector h3 {
    text-align: center;
    color: rgba(255,255,255,0.9);
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 1.25rem;
    letter-spacing: 0.5px;
}

.pole-selector-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.pole-option {
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 20px 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.pole-option:hover {
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.25);
}

.pole-option.selected {
    background: rgba(32,178,170,0.2);
    border-color: #20B2AA;
    box-shadow: 0 0 0 1px #20B2AA, 0 12px 28px rgba(32,178,170,0.25);
    transform: translateY(-5px);
}

.pole-visual {
    display: flex;
    gap: 6px;
    align-items: flex-end;
    height: 50px;
}

.mini-pole {
    width: 7px;
    height: 40px;
    background: linear-gradient(to bottom, #95a5a6, #7f8c8d);
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    animation: miniPoleFloat 2s ease-in-out infinite;
}

.mini-pole:nth-child(1) { animation-delay: 0s; }
.mini-pole:nth-child(2) { animation-delay: 0.15s; }
.mini-pole:nth-child(3) { animation-delay: 0.3s; }
.mini-pole:nth-child(4) { animation-delay: 0.45s; }
.mini-pole:nth-child(5) { animation-delay: 0.6s; }
.mini-pole:nth-child(6) { animation-delay: 0.75s; }
.mini-pole:nth-child(7) { animation-delay: 0.9s; }

.pole-title {
    font-size: 1em;
    font-weight: 700;
    color: #fff;
}

.pole-desc {
    font-size: 0.8em;
    color: rgba(255,255,255,0.6);
}

.pole-stars { font-size: 0.85em; }

/* ── Game Buttons ── */
.game-buttons {
    display: flex;
    gap: 12px;
    margin-top: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.game-buttons button {
    padding: 14px 28px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    border: none;
    border-radius: 12px;
    color: #fff;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    min-width: 140px;
}

.game-buttons button:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.3); }
.game-buttons button:active { transform: translateY(-1px); }

#start-btn  { background: linear-gradient(135deg, #2ecc71, #27ae60); }
#reset-btn  { background: linear-gradient(135deg, #e74c3c, #c0392b); }
#hint-btn   { background: linear-gradient(135deg, #f39c12, #e67e22); }

/* ── Win Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-card {
    background: linear-gradient(145deg, #1a3a4a, #0f2d3d);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    text-align: center;
    max-width: 420px;
    width: 90vw;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    animation: modalPop 0.4s cubic-bezier(0.34,1.56,0.64,1);
}

.modal-emoji { font-size: 4em; margin-bottom: 0.5rem; }

.modal-title {
    color: #fff;
    font-size: 2em;
    font-weight: 900;
    margin: 0 0 0.5rem;
}

.modal-subtitle {
    color: rgba(255,255,255,0.6);
    font-size: 1em;
    margin: 0 0 1.5rem;
}

.modal-stats {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 2rem;
}

.modal-stat {
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 14px 24px;
    min-width: 100px;
}

.modal-stat-label {
    font-size: 0.75em;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.modal-stat-value {
    font-size: 2em;
    font-weight: 800;
    color: #20B2AA;
}

.modal-btn {
    padding: 14px 36px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #fff;
    box-shadow: 0 6px 20px rgba(46,204,113,0.35);
    transition: all 0.25s ease;
}

.modal-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(46,204,113,0.45); }

/* ── Responsive ── */
@media (max-width: 768px) {
    #info-container { flex-direction: column; }
    .info-stats { flex-direction: row; justify-content: center; }
    .pole-selector-container { grid-template-columns: repeat(2, 1fr); }
    .game-buttons button { min-width: 120px; padding: 12px 20px; }
    .disc { width: 66px; height: 26px; }
    #game-container { padding: 1.25rem 1rem 2rem; }
}
