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

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3e 50%, #0d2847 100%);
    min-height: 100vh;
    color: #fff;
    direction: rtl;
    overflow-x: hidden;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 140, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(138, 43, 226, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Section */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    width: 120px;
    height: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.4));
    animation: float 3s ease-in-out infinite;
    cursor: default;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
    color: #ffd700;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
}

/* Subtle indicator - tiny dot after title, barely noticeable */
.indicator {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #ffd700;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.main-content {
    display: flex;
    gap: 50px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

.wheel-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.wheel-wrapper {
    position: relative;
}

.wheel-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 730px;
    height: 730px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse-normal 2s ease-in-out infinite;
    pointer-events: none;
    transition: all 0.5s ease;
}

.wheel-glow.rigged {
    width: 750px;
    height: 750px;
    background: radial-gradient(circle, rgba(255, 120, 50, 0.5) 0%, rgba(255, 80, 0, 0.2) 40%, transparent 70%);
    animation: pulse-rigged 1.5s ease-in-out infinite;
}

@keyframes pulse-normal {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
}

@keyframes pulse-rigged {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

.wheel-container {
    position: relative;
    width: 700px;
    height: 700px;
}

#wheel {
    border-radius: 50%;
    box-shadow: 
        0 0 0 8px rgba(255, 215, 0, 0.3),
        0 0 0 12px rgba(255, 215, 0, 0.1),
        0 0 40px rgba(255, 215, 0, 0.4),
        0 0 80px rgba(255, 215, 0, 0.2),
        inset 0 0 30px rgba(0, 0, 0, 0.4);
}

.wheel-center-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    object-fit: contain;
    border-radius: 50%;
    pointer-events: none;
    z-index: 5;
}

.pointer {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 35px solid transparent;
    border-right: 35px solid transparent;
    border-top: 70px solid #ffd700;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.5));
    z-index: 10;
}

.pointer::after {
    content: '';
    position: absolute;
    top: -56px;
    left: -14px;
    width: 28px;
    height: 28px;
    background: #fff;
    border-radius: 50%;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.3);
}

.spin-btn {
    padding: 18px 70px;
    font-size: 1.6rem;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(145deg, #ffd700, #ff8c00);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    color: #1a1a2e;
    transition: all 0.3s ease;
    box-shadow: 
        0 8px 25px rgba(255, 215, 0, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

.spin-icon {
    font-size: 1.4rem;
}

.spin-btn:hover {
    transform: scale(1.08) translateY(-3px);
    box-shadow: 
        0 12px 35px rgba(255, 215, 0, 0.6),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

.spin-btn:active {
    transform: scale(0.98);
}

.spin-btn:disabled {
    background: linear-gradient(145deg, #555, #444);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.controls-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
    min-width: 320px;
}

/* Card Style */
.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.names-input h3 {
    margin-bottom: 5px;
    color: #ffd700;
    font-size: 1.3rem;
}

.card-hint {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

#namesInput {
    width: 100%;
    height: 180px;
    padding: 15px;
    font-size: 1.1rem;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    resize: vertical;
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    transition: all 0.3s ease;
}

#namesInput::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#namesInput:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.update-btn {
    margin-top: 15px;
    padding: 14px 35px;
    font-size: 1.1rem;
    background: linear-gradient(145deg, #4CAF50, #2e7d32);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    color: #fff;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.4);
}

.update-btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.5);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(145deg, #2a2a5e, #1a1a3e);
    padding: 50px 60px;
    border-radius: 30px;
    text-align: center;
    border: 3px solid #ffd700;
    box-shadow: 
        0 0 60px rgba(255, 215, 0, 0.5),
        0 0 100px rgba(255, 215, 0, 0.2);
    animation: popIn 0.5s ease;
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
    animation: rotate 10s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content h2 {
    font-size: 2.8rem;
    color: #ffd700;
    margin-bottom: 10px;
    position: relative;
}

.winner-label {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

#winnerName {
    font-size: 3.5rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 30px;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.7);
    position: relative;
}

.close-btn {
    padding: 15px 50px;
    font-size: 1.3rem;
    background: linear-gradient(145deg, #ffd700, #ff8c00);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    color: #1a1a2e;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
    position: relative;
}

.close-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.6);
}

/* Responsive */
@media (max-width: 900px) {
    .container {
        padding: 15px;
    }
    
    .header {
        margin-bottom: 25px;
    }
    
    .main-content {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    
    .wheel-wrapper {
        transform: scale(0.8);
        margin: -20px 0;
    }
    
    .wheel-container {
        width: 320px;
        height: 320px;
    }
    
    #wheel {
        width: 320px;
        height: 320px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .logo {
        width: 70px;
        margin-bottom: 10px;
    }
    
    .spin-btn {
        padding: 14px 50px;
        font-size: 1.3rem;
    }
    
    .controls-section {
        min-width: 90%;
        max-width: 350px;
    }
    
    .card {
        padding: 20px;
    }
    
    .modal-content {
        padding: 30px 40px;
        margin: 20px;
    }
    
    #winnerName {
        font-size: 2.5rem;
    }
}

@media (max-width: 400px) {
    .logo {
        width: 60px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .wheel-wrapper {
        transform: scale(0.7);
        margin: -35px 0;
    }
    
    .spin-btn {
        padding: 12px 40px;
        font-size: 1.2rem;
    }
    
    .names-input h3 {
        font-size: 1.1rem;
    }
    
    #namesInput {
        height: 150px;
        font-size: 1rem;
    }
}
