* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

[hidden] {
    display: none !important;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    background: #0b1d49;
    color: #ffffff;
    font-family: "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
}

body {
    overflow-x: hidden;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.control-shell {
    position: relative;
    width: 100%;
    max-width: 620px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 14px 14px 24px;
    overflow: hidden;
    background: #173b88;
}

.control-header,
.identity-card,
.turn-status,
.aim-section,
.stats-card {
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    background: #102b68;
}

.control-header {
    display: table;
    width: 100%;
    padding: 10px 12px;
}

.mini-ball,
.header-copy,
.connection-badge {
    display: table-cell;
    vertical-align: middle;
}

.mini-ball {
    width: 58px;
    color: #ffda33;
    font-size: 48px;
    line-height: 1;
    text-align: center;
    transform: rotate(-12deg);
}

.header-copy p,
.header-copy h1 {
    margin: 0;
}

.header-copy p {
    color: #7af1f6;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.header-copy h1 {
    color: #ffda33;
    font-size: 30px;
    line-height: 1;
}

.connection-badge {
    width: 78px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    font-weight: bold;
    text-align: right;
    text-transform: uppercase;
}

.identity-card {
    margin-top: 10px;
    padding: 10px 12px 12px;
}

.identity-card label,
.section-kicker,
.turn-label {
    display: block;
    color: #7af1f6;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.name-row {
    display: table;
    width: 100%;
    margin-top: 7px;
}

.name-row input,
.name-row button {
    display: table-cell;
    height: 44px;
    border: 0;
}

.name-row input {
    width: 74%;
    padding: 0 12px;
    border-radius: 12px 0 0 12px;
    outline: 0;
    background: #ffffff;
    color: #0b1d49;
    font-size: 17px;
    font-weight: bold;
}

.name-row button {
    width: 26%;
    border-radius: 0 12px 12px 0;
    background: #35d9e8;
    color: #0b1d49;
    font-weight: bold;
}

.turn-status {
    margin-top: 10px;
    padding: 10px 12px;
    text-align: center;
}

.turn-status strong,
.turn-status span {
    display: block;
}

.turn-status strong {
    margin: 3px 0;
    color: #ffda33;
    font-size: 22px;
    line-height: 1.05;
}

.turn-status span:last-child {
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
}

.aim-section {
    margin-top: 10px;
    padding: 12px;
    transition: opacity 0.2s ease;
}

.aim-section.locked {
    opacity: 0.76;
}

.aim-heading-row {
    display: table;
    width: 100%;
    min-height: 50px;
}

.aim-heading-row > div {
    display: table-cell;
    vertical-align: middle;
}

.aim-heading-row h2 {
    margin: 2px 0 8px;
    color: #ffffff;
    font-size: 23px;
}

.phone-countdown {
    width: 54px;
    height: 54px;
    border: 4px solid #ffffff;
    border-radius: 50%;
    background: #e84478;
    color: #ffffff;
    font-size: 31px;
    font-weight: bold;
    line-height: 46px;
    text-align: center;
    transform: rotate(-4deg);
}

.aim-pad {
    position: relative;
    width: 100%;
    height: 42vh;
    min-height: 235px;
    max-height: 390px;
    overflow: hidden;
    border: 9px solid #ffffff;
    border-bottom-width: 6px;
    border-radius: 9px 9px 2px 2px;
    background: #dff7f4;
    cursor: crosshair;
    touch-action: none;
    -ms-touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.pad-net,
.pad-net i {
    position: absolute;
    display: block;
}

.pad-net {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 0.34;
}

.vertical-lines i {
    top: 0;
    bottom: 0;
    width: 2px;
    background: #245db4;
}

.vertical-lines i:nth-child(1) { left: 16.6%; }
.vertical-lines i:nth-child(2) { left: 33.2%; }
.vertical-lines i:nth-child(3) { left: 49.8%; }
.vertical-lines i:nth-child(4) { left: 66.4%; }
.vertical-lines i:nth-child(5) { left: 83%; }

.horizontal-lines i {
    right: 0;
    left: 0;
    height: 2px;
    background: #245db4;
}

.horizontal-lines i:nth-child(1) { top: 25%; }
.horizontal-lines i:nth-child(2) { top: 50%; }
.horizontal-lines i:nth-child(3) { top: 75%; }

.pad-striker {
    position: absolute;
    bottom: -2px;
    left: 50%;
    z-index: 2;
    width: 100px;
    height: 155px;
    margin-left: -50px;
    background: url("assets/striker.png") no-repeat center bottom;
    background-size: contain;
    pointer-events: none;
}

.aim-marker {
    position: absolute;
    top: 32%;
    left: 50%;
    z-index: 5;
    width: 58px;
    height: 58px;
    margin: -29px 0 0 -29px;
    border: 5px solid #e84478;
    border-radius: 50%;
    background: rgba(255, 218, 51, 0.38);
    opacity: 0;
    pointer-events: none;
    transform: scale(0.7);
    transition: transform 0.12s ease, opacity 0.12s ease;
}

.aim-marker.visible {
    opacity: 1;
    transform: scale(1);
}

.aim-marker:before,
.aim-marker:after,
.aim-marker span {
    position: absolute;
    display: block;
    content: "";
    background: #e84478;
}

.aim-marker:before {
    top: 22px;
    left: -12px;
    width: 72px;
    height: 4px;
}

.aim-marker:after {
    top: -12px;
    left: 22px;
    width: 4px;
    height: 72px;
}

.aim-marker span {
    top: 20px;
    left: 20px;
    z-index: 2;
    width: 8px;
    height: 8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
}

.lock-message {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 8;
    width: 210px;
    margin: -24px 0 0 -105px;
    padding: 13px 10px;
    border: 3px solid #ffffff;
    border-radius: 13px;
    background: #733a96;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
}

.aim-section.active .lock-message {
    display: none;
}

.aim-help {
    min-height: 34px;
    margin: 9px 2px 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    line-height: 1.35;
    text-align: center;
}

.stats-card {
    display: table;
    width: 100%;
    margin-top: 10px;
    padding: 10px 4px;
    table-layout: fixed;
}

.stats-card > div {
    display: table-cell;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
}

.stats-card > div:last-child {
    border-right: 0;
}

.stats-card strong,
.stats-card span {
    display: block;
}

.stats-card strong {
    color: #ffda33;
    font-size: 25px;
}

.stats-card span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.pulse-banner {
    position: fixed;
    top: 38%;
    left: 50%;
    z-index: 20;
    width: 250px;
    margin-left: -125px;
    padding: 18px 12px;
    border: 5px solid #ffffff;
    border-radius: 18px;
    background: #e84478;
    color: #ffffff;
    font-size: 25px;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    opacity: 0;
    pointer-events: none;
    transform: rotate(-4deg) scale(0.7);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.pulse-banner.show {
    opacity: 1;
    transform: rotate(2deg) scale(1);
}

@media (max-height: 700px) {
    .control-shell { padding-top: 8px; }
    .identity-card,
    .turn-status,
    .aim-section,
    .stats-card { margin-top: 7px; }
    .identity-card { padding-top: 7px; padding-bottom: 8px; }
    .name-row input,
    .name-row button { height: 38px; }
    .turn-status { padding-top: 7px; padding-bottom: 7px; }
    .aim-section { padding: 9px; }
    .aim-heading-row { min-height: 40px; }
    .aim-heading-row h2 { margin-bottom: 4px; font-size: 20px; }
    .phone-countdown { width: 44px; height: 44px; font-size: 26px; line-height: 36px; }
    .aim-pad { min-height: 210px; height: 35vh; }
}

@media (orientation: landscape) and (max-height: 520px) {
    .control-shell {
        max-width: none;
        padding: 8px;
    }

    .control-header {
        position: absolute;
        top: 8px;
        left: 8px;
        width: 32%;
    }

    .identity-card {
        position: absolute;
        top: 86px;
        left: 8px;
        width: 32%;
    }

    .turn-status {
        position: absolute;
        top: 164px;
        bottom: 90px;
        left: 8px;
        width: 32%;
    }

    .aim-section {
        margin: 0 0 0 34%;
    }

    .aim-pad {
        height: 63vh;
        max-height: none;
    }

    .pad-striker {
        width: 82px;
        height: 128px;
        margin-left: -41px;
    }

    .stats-card {
        position: absolute;
        bottom: 8px;
        left: 8px;
        width: 32%;
    }
}
