@import url('css2.css');

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

html, body {
    font-family: 'Noto Serif SC', serif;
    overflow: hidden;
    height: 100%;
    width: 100%;
}

.bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('bg2.jpeg');
    background-size: cover;
    background-position: center;
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 5, 20, 0.4);
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    opacity: 0.5;
    animation: twinkle 3s infinite ease-in-out;
}

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

.main-container {
    position: relative;
    z-index: 10;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 5vh 4vw;
}

.wheel-container {
    position: relative;
    width: min(75vw, 320px);
    height: min(75vw, 320px);
    cursor: pointer;
    transition: all 0.3s ease;
}

.wheel-container:hover {
    transform: scale(1.02);
}

.wheel-container:active {
    transform: scale(0.98);
}

.wheel-glow {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.4) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.wheel-glow.active {
    opacity: 1;
    animation: pulse-glow 1s infinite alternate;
}

@keyframes pulse-glow {
    from {
        transform: scale(1);
        opacity: 0.4;
    }
    to {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

#wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 60px rgba(212, 175, 55, 0.3), 0 20px 60px rgba(0,0,0,0.5);
    transition: transform 5s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

.pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 40px;
    background: linear-gradient(to bottom, #d4af37, #f0e68c);
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    z-index: 20;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.8));
}

.ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    font-weight: 600;
    font-size: 14px;
    margin: 0 3px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    opacity: 0;
    transform: scale(0);
}

.ball.red {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.ball.blue {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.ball.show {
    animation: ball-pop 0.5s ease forwards;
}

@keyframes ball-pop {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.result-card {
    background: rgba(20, 15, 35, 0.85);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 16px;
    padding: 20px;
    width: 100%;
    max-width: 340px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.result-card.show {
    opacity: 1;
    transform: translateY(0);
}

.golden-text {
    color: #d4af37;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.sign-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    background: linear-gradient(90deg, #d4af37, #f0e68c, #d4af37);
    background-size: 200% 100%;
    color: #1a1a2e;
    font-weight: 700;
    font-size: 14px;
    animation: gradient-shift 3s ease infinite;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.fortune-text {
    line-height: 1.8;
    color: #e0e0e0;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.8s ease 0.3s;
}

.fortune-text.show {
    opacity: 1;
    transform: translateY(0);
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #d4af37;
    border-radius: 50%;
    opacity: 0;
}

@keyframes particle-fly {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0);
    }
}

.hidden {
    display: none !important;
}