/* Modern Wheel Picker Styling */
.wheel-page {
    font-family: 'Tajawal', sans-serif;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

.wheel-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

.wheel-container {
    max-width: 1200px;
    margin: 0 auto 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
}

/* Wheel Section */
.wheel-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
}

.wheel-wrapper {
    position: relative;
    width: 100%;
    max-width: 450px;
    aspect-ratio: 1;
    margin-bottom: 2rem;
}

#wheelCanvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}

.wheel-marker {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 30px solid rgba(255, 59, 48, 0.9);
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.3));
    z-index: 2;
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #333;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.wheel-controls {
    display: flex;
    gap: 1rem;
    width: 100%;
    max-width: 400px;
}

.wheel-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.spin-btn {
    background: rgba(76, 217, 100, 0.85);
}

.reset-btn {
    background: rgba(255, 59, 48, 0.85);
}

.wheel-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Names Section */
.names-section {
    padding: 2rem;
}

.names-section h3 {
    color: white;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
}

.add-name-form {
    margin-bottom: 1.5rem;
}

.input-group {
    display: flex;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.name-input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.add-btn {
    width: 50px;
    border: none;
    background: #3a7bd5;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.2rem;
}

.add-btn:hover {
    background: #2c71c4;
}

.names-list-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
}

.names-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.name-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 1rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    color: white;
    transition: all 0.3s ease;
}

.name-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.delete-name {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-name:hover {
    color: #ff3b30;
}

.empty-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    height: 100px;
    text-align: center;
}

.empty-list i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Winner Display */
.winner-display {
    background: rgba(58, 123, 213, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    display: none;
    position: relative;
    overflow: hidden;
}

.winner-display.show {
    display: block;
    animation: pulseWinner 2s infinite;
}

.winner-title {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.winner-name {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0.7;
    border-radius: 2px;
    animation: fall 3s ease-out forwards;
}

@keyframes pulseWinner {
    0%, 100% { box-shadow: 0 0 5px rgba(58, 123, 213, 0.7); }
    50% { box-shadow: 0 0 20px rgba(58, 123, 213, 0.9); }
}

@keyframes fall {
    0% { transform: translateY(-50px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(300px) rotate(720deg); opacity: 0; }
}

/* Spinning animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinning {
    animation: spin 5s cubic-bezier(0.24, 0.64, 0.13, 1) forwards;
}

/* Responsive design */
@media (max-width: 992px) {
    .wheel-container {
        grid-template-columns: 1fr;
    }
    
    .wheel-wrapper {
        max-width: 350px;
    }
}

@media (max-width: 768px) {
    .wheel-controls {
        flex-direction: column;
    }
    
    .wheel-wrapper {
        max-width: 300px;
    }
}
