:root {
    --bg-main: #0c0e14;
    --bg-card: #141722;
    --bg-card-hover: #1b1f2e;
    --accent-orange: #ff5500;
    --accent-green: #00ff66;
    --text-light: #f5f6fa;
    --text-muted: #718093;
    --target-deg: 0deg;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-light);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background-color: var(--bg-card);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-weight: 800;
    font-size: 20px;
    color: var(--accent-orange);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.balance-badge {
    background: rgba(0, 255, 102, 0.1);
    border: 1px solid var(--accent-green);
    color: var(--accent-green);
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: bold;
}

.btn-auth {
    background: var(--accent-orange);
    border: none;
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: bold;
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.2s;
}

.btn-auth:hover {
    opacity: 0.9;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
    flex-grow: 1;
}

.upgrader-grid {
    display: grid;
    grid-template-columns: 1fr 340px 1fr;
    gap: 40px;
    align-items: center;
}

.skin-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.skin-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-orange);
    transform: translateY(-5px);
}

.skin-title {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 5px;
    text-transform: uppercase;
}

.skin-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    min-height: 44px;
}

.skin-img-wrapper {
    height: 140px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.skin-img {
    max-height: 100%;
    max-width: 100%;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.5));
}

.skin-price {
    font-size: 24px;
    font-weight: 800;
    color: var(--accent-green);
}

.wheel-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wheel-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin-bottom: 30px;
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        var(--accent-orange) 0% 0%, 
        #1e2235 0% 100%
    );
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 30px rgba(255, 85, 0, 0.1);
}

.wheel-inner {
    width: 86%;
    height: 86%;
    background: var(--bg-main);
    border-radius: 50%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.chance-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-light);
}

.chance-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 5px;
}

.pointer {
    position: absolute;
    top: 0;
    width: 6px;
    height: 50%;
    background: #ffffff;
    border-radius: 4px;
    transform-origin: bottom center;
    transform: rotate(0deg);
    z-index: 3;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.pointer.spinning {
    animation: rotateWheel 5s cubic-bezier(0.15, 0.85, 0.15, 1) forwards;
}

@keyframes rotateWheel {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(var(--target-deg)); }
}

.btn-upgrade {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-orange), #e04400);
    border: none;
    color: white;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(255, 85, 0, 0.3);
    transition: all 0.2s ease;
}

.btn-upgrade:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 85, 0, 0.5);
}

.btn-upgrade:disabled {
    background: #2a2e3d;
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
}

.result-banner {
    margin-top: 20px;
    font-size: 16px;
    font-weight: bold;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s ease;
    text-align: center;
    min-height: 24px;
}

.result-banner.show {
    opacity: 1;
    transform: scale(1);
}

.status-win { color: var(--accent-green); }
.status-lose { color: #ff3333; }