/* css/style.css */
:root {
    --primary-color: #0df049;
    --primary-dark: #07962b;
    --dark-bg: rgba(10, 15, 20, 0.85);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-light: #f0f4f8;
    --text-highlight: #ffffff;
    --danger: #ff3366;
    --warning: #ffcc00;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

body {
    background-color: #000;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    color: var(--text-light);
    width: 100vw;
    height: 100vh;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: radial-gradient(circle at top, #1a2a3a 0%, #050a10 100%);
}

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

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

/* HUD Top */
#hud-top {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
}

.hud-panel {
    background: var(--dark-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 10px 15px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    text-align: center;
    min-width: 90px;
}

.wind-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wind-label, .level-label, .score-label {
    font-size: 10px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 5px;
    font-weight: 600;
}

#wind-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

#wind-arrow {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 24px;
}

.level-panel {
    transform: scale(1.1);
    background: linear-gradient(135deg, rgba(20, 30, 40, 0.9), rgba(10, 15, 20, 0.9));
    border-top: 2px solid var(--primary-color);
}

#level-display {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 28px;
    color: var(--text-highlight);
    text-shadow: 0 2px 10px rgba(13, 240, 73, 0.4);
}

.par-label {
    font-size: 11px;
    color: var(--warning);
    margin-top: 2px;
    font-weight: 700;
}

#score-display {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 24px;
}

/* Power Meter */
#power-meter-container {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: auto;
    transition: opacity 0.3s ease;
}

#power-meter-bar {
    width: 100%;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    border: 2px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

#power-meter-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #0df049, #ffcc00, #ff3366);
    transform-origin: left;
    transition: width 0.05s linear;
}

#power-meter-sweetspot {
    position: absolute;
    left: 95%; /* Adjust based on club/level */
    width: 10px;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 8px rgba(255, 255, 255, 1);
    transform: translateX(-50%);
}

#power-meter-cursor {
    position: absolute;
    top: -5px;
    left: 0%;
    width: 4px;
    height: 34px;
    background: #fff;
    box-shadow: 0 0 10px #fff;
    transition: left 0.05s linear;
    border-radius: 2px;
}

#power-label {
    margin-top: 15px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Spin Control */
#spin-control-container {
    position: absolute;
    bottom: 40px;
    right: 20px;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#spin-ball {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff, #b0c4de);
    box-shadow: inset -5px -5px 15px rgba(0,0,0,0.5), 0 5px 15px rgba(0,0,0,0.4);
    position: relative;
    margin-bottom: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

#spin-cursor {
    width: 12px;
    height: 12px;
    background: var(--danger);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px var(--danger);
    border: 2px solid #fff;
}

.spin-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.7);
}

/* Menus Overlay */
#main-menu {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.8)), url('../assets/images/thumbnail.png') center/cover no-repeat;
}

.menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    z-index: 100;
    transition: opacity 0.3s ease;
}

.menu-content {
    background: linear-gradient(180deg, rgba(20, 30, 40, 0.9), rgba(10, 15, 20, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 40px;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255,255,255,0.2);
    max-width: 90%;
    width: 400px;
    transform: translateY(0);
    animation: menuFloat 4s ease-in-out infinite alternate;
}

@keyframes menuFloat {
    0% { transform: translateY(-5px); }
    100% { transform: translateY(5px); }
}

.game-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 36px;
    line-height: 1.1;
    margin-bottom: 30px;
    color: #fff;
    text-shadow: 0 4px 20px rgba(13, 240, 73, 0.6);
}

.game-title span {
    color: var(--primary-color);
    font-size: 42px;
}

.menu-content h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 28px;
    margin-bottom: 20px;
    color: #fff;
}

/* Buttons */
button {
    display: block;
    width: 100%;
    padding: 16px 20px;
    margin-bottom: 15px;
    border-radius: 12px;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 1px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary {
    background: linear-gradient(to bottom, #11ff55, #0df049);
    color: #000;
    box-shadow: 0 6px 0 #07962b, 0 10px 20px rgba(13, 240, 73, 0.4);
}

.btn-primary:active {
    transform: translateY(6px);
    box-shadow: 0 0 0 #07962b, 0 2px 10px rgba(13, 240, 73, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
}

.btn-secondary:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0.3);
}

/* Tutorial List */
.tutorial-list {
    list-style: none;
    text-align: left;
    margin-bottom: 30px;
}

.tutorial-list li {
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.4;
    display: flex;
    align-items: center;
}

.tutorial-list span {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: #000;
    border-radius: 50%;
    font-weight: 800;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 30px;
}

.stat-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px 5px;
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 10px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 5px;
    font-weight: 700;
}

.stat-value {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 900;
    color: var(--primary-color);
}

.hidden {
    opacity: 0;
    pointer-events: none !important;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    #power-meter-container {
        width: 80%;
    }
    
    .menu-content {
        padding: 30px 20px;
    }
    
    .game-title {
        font-size: 28px;
    }
    .game-title span {
        font-size: 32px;
    }
    
    #spin-control-container {
        bottom: 100px;
        right: 10px;
        transform: scale(0.8);
    }
}
