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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1f2e;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

:root {
    --bg-image: none;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0;
    transition: opacity 0.8s ease-out;
    pointer-events: none;
    z-index: -1;
}

body.show-background::before {
    opacity: 1;
}

.container {
    text-align: center;
    padding: 40px;
    position: relative;
    z-index: 1;
}

h1 {
    color: white;
    margin-bottom: 40px;
    font-size: 2.5rem;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8), 2px 2px 8px rgba(0, 0, 0, 0.6);
    font-weight: 700;
    padding: 15px 30px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    backdrop-filter: blur(5px);
    display: inline-block;
}

.wheel-wrapper {
    position: relative;
    width: 600px;
    height: 600px;
    margin: 0 auto 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wheel-pointer {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 22px solid transparent;
    border-right: 22px solid transparent;
    border-top: 45px solid #ffd700;
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.wheel {
    width: 600px;
    height: 600px;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform-origin: center;
}

#wheel-svg {
    transform-origin: center;
}

.wheel-segment {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wheel-segment span {
    font-weight: bold;
    color: white;
    font-size: 16px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
    user-select: none;
    position: absolute;
}

.wheel::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

.result-section {
    margin-top: 30px;
}

.spin-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 50px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.spin-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.spin-button:active:not(:disabled) {
    transform: translateY(0);
}

.spin-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.result-text {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 30px;
    min-height: 0;
    height: 0;
    opacity: 0;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8), 2px 2px 8px rgba(0, 0, 0, 0.6);
    padding: 0;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    backdrop-filter: blur(5px);
    overflow: hidden;
    transition: opacity 0.3s ease-out, height 0.3s ease-out, padding 0.3s ease-out;
}

.result-text.show {
    padding: 15px 30px;
    height: auto;
    opacity: 1;
    animation: slideIn 0.5s ease-out;
}

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