/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-drag: none;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #05060c;
    font-family: 'Outfit', sans-serif;
    color: #ffffff;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* MENU LAYOUTS */
.menu-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background: radial-gradient(circle at center, rgba(12, 16, 35, 0.92) 0%, rgba(5, 6, 12, 0.98) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    animation: fadeIn 0.5s ease-out;
}

.menu-content {
    width: 100%;
    max-width: 900px;
    background: rgba(20, 24, 45, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* LOGO & HERO AREA */
.logo-area {
    text-align: center;
    margin-bottom: 10px;
}

.badge {
    background: linear-gradient(90deg, #ff3e6c, #ff7b00);
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 800;
    border-radius: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(255, 62, 108, 0.4);
}

.logo-text {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: -1px;
    margin-top: 10px;
    text-transform: uppercase;
    font-family: 'Space Grotesk', sans-serif;
}

.neon-text {
    color: #00ff87;
    text-shadow: 0 0 10px rgba(0, 255, 135, 0.5), 0 0 30px rgba(0, 255, 135, 0.3);
}

.tagline {
    font-size: 1.1rem;
    color: #8a8eaf;
    margin-top: 5px;
}

/* SETUP PANELS */
.setup-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .setup-panels {
        grid-template-columns: 1fr;
    }
}

.panel {
    background: rgba(10, 12, 22, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
}

.panel h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #ffffff;
    border-left: 3px solid #00dfd0;
    padding-left: 10px;
}

/* TEAM SELECTOR */
.team-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.team-option {
    background: rgba(255, 255, 255, 0.02);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.team-option:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.team-option.active {
    background: rgba(0, 223, 208, 0.08);
    border-color: #00dfd0;
    box-shadow: 0 0 15px rgba(0, 223, 208, 0.2);
}

.team-jersey {
    width: 60px;
    height: 60px;
    position: relative;
    margin-bottom: 12px;
}

/* Draw a stylized diaper/jersey shape */
.team-jersey::before {
    content: '👶';
    font-size: 2.2rem;
    display: block;
    text-align: center;
}

.team-jersey::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 10px;
    width: 40px;
    height: 15px;
    border-radius: 4px;
}

.team-jersey.red::after {
    background: #ff3e6c;
    box-shadow: 0 0 10px rgba(255, 62, 108, 0.5);
}

.team-jersey.blue::after {
    background: #0088ff;
    box-shadow: 0 0 10px rgba(0, 136, 255, 0.5);
}

.team-name {
    font-weight: 700;
    font-size: 1rem;
}

.team-sub {
    font-size: 0.75rem;
    color: #8a8eaf;
    margin-top: 3px;
}

/* TOGGLE BUTTONS */
.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8a8eaf;
    margin-bottom: 10px;
    font-weight: 600;
}

.toggle-buttons {
    display: flex;
    gap: 10px;
}

.toggle-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #8a8eaf;
    padding: 10px 15px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.toggle-btn.active {
    background: #ffffff;
    color: #0c1023;
    font-weight: 700;
    border-color: #ffffff;
}

/* ACTION AREA */
.action-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.btn {
    border: none;
    outline: none;
    font-family: inherit;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-transform: uppercase;
}

.btn-primary {
    background: linear-gradient(135deg, #00ff87 0%, #60efff 100%);
    color: #05060c;
    padding: 16px 60px;
    font-size: 1.3rem;
    border-radius: 30px;
    box-shadow: 0 8px 30px rgba(0, 255, 135, 0.4);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 255, 135, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 30px;
    font-size: 0.95rem;
    border-radius: 20px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.instructions-inline {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: #8a8eaf;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-credit {
    margin-top: 30px;
    font-size: 0.75rem;
    color: #4c5070;
}

/* GAMEPLAY HUD */
.hud-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
}

.hidden {
    display: none !important;
}

/* SCOREBOARD */
.scoreboard {
    align-self: center;
    background: rgba(10, 12, 22, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 12px 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    pointer-events: auto;
}

.scoreboard .team {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.text-red {
    color: #ff3e6c;
}

.text-blue {
    color: #0088ff;
}

.score-box {
    background: #05060c;
    border-radius: 6px;
    padding: 4px 16px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.score-divider {
    color: #4c5070;
    margin: 0 5px;
}

.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 20px;
}

#match-time {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #00ff87;
}

.match-half {
    font-size: 0.65rem;
    color: #8a8eaf;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: -2px;
}

/* NOTIFICATIONS FEED */
.game-feed {
    position: absolute;
    bottom: 120px;
    left: 24px;
    width: 320px;
    max-height: 200px;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.feed-item {
    background: rgba(10, 12, 22, 0.6);
    border-left: 4px solid #00ff87;
    padding: 10px 16px;
    border-radius: 0 8px 8px 0;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease-out forwards;
    color: rgba(255, 255, 255, 0.9);
}

.feed-item.goal {
    border-left-color: #ff7b00;
    background: rgba(255, 123, 0, 0.15);
    font-weight: 700;
}

.feed-item.cry {
    border-left-color: #ff3e6c;
}

/* CROSSHAIR & SHOT BAR */
.crosshair-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.pacifier-crosshair {
    font-size: 2rem;
    opacity: 0.7;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

#shot-bar-container {
    width: 60px;
    height: 6px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

#shot-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #00ff87, #ff7b00);
}

/* RIGHT SIDE CARDS */
.side-info {
    position: absolute;
    top: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 250px;
}

.controls-card, .baby-stats-card {
    background: rgba(10, 12, 22, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.controls-card h4, .baby-stats-card h4 {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #00dfd0;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.control-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-bottom: 6px;
    color: #8a8eaf;
}

.control-row span:first-child {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 2px 6px;
    color: #ffffff;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
}

.stamina-container {
    margin-bottom: 12px;
}

.stamina-label {
    display: block;
    font-size: 0.75rem;
    color: #8a8eaf;
    margin-bottom: 4px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff87, #00dfd0);
    transition: width 0.1s ease;
}

.pacifier-state {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.status-ok {
    color: #00ff87;
    font-weight: 700;
}

.status-warn {
    color: #ff3e6c;
    font-weight: 700;
    animation: blink 0.5s infinite;
}

/* RADAR (MINIMAP) */
.radar-container {
    align-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.radar-pitch {
    position: relative;
    width: 180px;
    height: 90px;
    background: rgba(10, 12, 22, 0.8);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    overflow: hidden;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.radar-center-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
}

.radar-pitch::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
}

.radar-goal {
    position: absolute;
    top: 30px;
    width: 6px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.radar-goal-left {
    left: 0;
    border-left: none;
}

.radar-goal-right {
    right: 0;
    border-right: none;
}

.radar-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.radar-dot.team-red {
    background-color: #ff3e6c;
    box-shadow: 0 0 6px #ff3e6c;
}

.radar-dot.team-blue {
    background-color: #0088ff;
    box-shadow: 0 0 6px #0088ff;
}

.radar-dot.player {
    background-color: #00ff87;
    box-shadow: 0 0 10px #00ff87;
    width: 8px;
    height: 8px;
    z-index: 3;
}

.radar-dot.ball {
    background-color: #ffffff;
    box-shadow: 0 0 8px #ffffff;
    width: 5px;
    height: 5px;
    z-index: 4;
}

.radar-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #8a8eaf;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* OVERLAYS (PAUSE & NOTICE) */
.overlay-notice {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 8;
    background: rgba(5, 6, 12, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
}

.notice-box {
    background: rgba(15, 20, 38, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px 40px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    width: 90%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.notice-box h2 {
    font-size: 2rem;
    font-family: 'Space Grotesk', sans-serif;
    color: #ffffff;
}

.notice-box p {
    font-size: 0.95rem;
    color: #8a8eaf;
    line-height: 1.5;
}

/* GAME OVER LAYOUT DETAILS */
.game-over-content {
    align-items: center;
    max-width: 650px;
}

.final-score-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin: 20px 0;
}

.final-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.team-jersey.big {
    width: 90px;
    height: 90px;
}

.team-jersey.big::before {
    font-size: 3.5rem;
}

.team-jersey.big::after {
    width: 60px;
    height: 20px;
    left: 15px;
}

.final-team-name {
    font-weight: 800;
    font-size: 1.2rem;
}

.final-score {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    color: #ffffff;
    display: flex;
    gap: 15px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.stats-table {
    width: 100%;
    background: rgba(10, 12, 22, 0.4);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-table h3 {
    text-align: center;
    font-size: 0.95rem;
    color: #00dfd0;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-row span:nth-child(2) {
    color: #8a8eaf;
}

.stat-row span:first-child, .stat-row span:last-child {
    font-weight: 700;
    font-size: 1.1rem;
    width: 40px;
    text-align: center;
}

/* KEYFRAMES & ANIMATIONS */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
