* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Share Tech Mono', monospace;
    background:
        radial-gradient(circle at top, rgba(0, 255, 255, 0.08), transparent 35%),
        linear-gradient(180deg, #050816 0%, #07111f 45%, #03060d 100%);
    color: #ffffff;
    min-height: 100vh;
}

.page {
    width: min(1200px, 92%);
    margin: 0 auto;
    padding: 40px 0 60px;
}

h1 {
    text-align: center;
    font-size: clamp(2rem, 4vw, 3.6rem);
    margin: 0 0 10px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.18);
}

.subtitle {
    text-align: center;
    color: #b8d7e8;
    margin: 0 0 35px;
    font-size: 1rem;
}

.game-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.player-card {
    background: rgba(8, 18, 34, 0.88);
    border: 1px solid rgba(0, 255, 255, 0.22);
    border-radius: 20px;
    padding: 24px;
    box-shadow:
        0 0 24px rgba(0, 255, 255, 0.08),
        inset 0 0 12px rgba(255, 255, 255, 0.03);
}

.player-card h2 {
    margin: 0 0 18px;
    font-size: 1.4rem;
}

.label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #d9edf8;
}

.input-row {
    position: relative;
}

.password-input {
    width: 100%;
    padding: 14px 48px 14px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: 0.2s ease;
}

.password-input:focus {
    border-color: rgba(0, 255, 255, 0.7);
    box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.12);
}

.toggle-btn {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #d8f6ff;
    font-family: inherit;
    cursor: pointer;
    font-size: 0.9rem;
}

.char-count {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #a9c5d4;
}

.meter-label {
    margin-top: 16px;
    margin-bottom: 8px;
    color: #d9edf8;
    font-size: 0.95rem;
}

.strength-track {
    width: 100%;
    height: 14px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.strength-fill {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s ease;
    background: linear-gradient(90deg, #2d7cff, #00e5ff);
}

.result-box {
    margin-top: 18px;
    padding: 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 165px;
}

.score-line {
    margin: 0 0 10px;
    font-size: 1rem;
}

.score-number {
    font-size: 1.2rem;
    color: #8fefff;
}

.feedback-list {
    margin: 10px 0 0;
    padding-left: 18px;
    color: #d0e7f2;
}

.feedback-list li {
    margin-bottom: 6px;
}

.loading-wrap {
    margin-top: 14px;
}

.loading-label {
    font-size: 0.9rem;
    color: #b9d4df;
    margin-bottom: 7px;
}

.loading-bar {
    width: 100%;
    height: 16px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.loading-fill {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #ffffff, #7ee6ff);
}

.crack-time {
    margin-top: 10px;
    color: #ffffff;
    min-height: 24px;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.action-btn {
    border: none;
    border-radius: 12px;
    padding: 14px 22px;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.action-btn:hover {
    transform: translateY(-1px);
}

#battleBtn {
    background: linear-gradient(90deg, #00d9ff, #7dffef);
    color: #03131d;
    font-weight: bold;
    box-shadow: 0 0 18px rgba(0, 217, 255, 0.2);
}

#resetBtn {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.winner-box {
    margin-top: 30px;
    text-align: center;
    padding: 22px;
    border-radius: 18px;
    background: rgba(9, 22, 39, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 28px rgba(0, 255, 255, 0.08);
}

.winner-box h3 {
    margin: 0 0 10px;
    font-size: 1.5rem;
}

.winner-text {
    font-size: 1.15rem;
    color: #dff8ff;
}

.player-card.winner {
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow:
        0 0 28px rgba(255, 255, 255, 0.12),
        0 0 32px rgba(0, 255, 255, 0.14);
}

.note {
    margin-top: 16px;
    text-align: center;
    color: #a9c5d4;
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .game-wrap {
        grid-template-columns: 1fr;
    }
}
#homeBtn {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.16);
}