/* إعدادات عامة */
* {
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* رأس الصفحة */
header {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 20px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

nav {
    margin-top: 30px;
    margin-bottom: 15px;
}

.admin-btn, .back-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 25px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.admin-btn:hover, .back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* المحتوى الرئيسي */
main {
    padding: 40px;
}

.message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.message h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #333;
}

/* دولاب الحظ */
.wheel-container {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.wheel-wrapper {
    position: relative;
    display: inline-block;
    margin: 30px auto;
}

#wheel {
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    transition: transform 3s cubic-bezier(0.23, 1, 0.32, 1);
}

.wheel-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 30px solid #ff6b6b;
    z-index: 10;
}

.controls {
    margin: 30px 0;
}

.spin-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2em;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.spin-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.spin-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.result {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-radius: 15px;
    font-size: 1.5em;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.wheel-info {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.wheel-info h3 {
    color: #333;
    margin-bottom: 10px;
}

/* نماذج الإدارة */
.create-wheel, .wheels-list {
    margin-bottom: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
}

.create-wheel h2, .wheels-list h2 {
    color: #333;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 3px solid #ff6b6b;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #ff6b6b;
}

/* عناصر الجوائز */
.prize-item {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.prize-input {
    flex: 2;
}

.prize-type {
    flex: 1;
}

.remove-prize {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.remove-prize:hover {
    background: #c82333;
}

/* الأزرار */
.btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1em;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    font-size: 1.1em;
    padding: 15px 30px;
}

/* قائمة الدواليب */
.wheel-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border-right: 5px solid #ff6b6b;
}

.wheel-card.active {
    border-right-color: #28a745;
    background: #f8fff9;
}

.wheel-card h3 {
    color: #333;
    margin-bottom: 10px;
}

.wheel-card .wheel-meta {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.wheel-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.wheel-actions button {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
}

.activate-btn {
    background: #28a745;
    color: white;
}

.deactivate-btn {
    background: #ffc107;
    color: #000;
}

.delete-btn {
    background: #dc3545;
    color: white;
}

.edit-btn {
    background: #17a2b8;
    color: white;
}

/* حالات مخفية */
.hidden {
    display: none !important;
}

/* استجابة للشاشات الصغيرة */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 10px;
    }
    
    main {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    #wheel {
        width: 300px;
        height: 300px;
    }
    
    .prize-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .wheel-actions {
        flex-direction: column;
    }
}

/* تأثيرات إضافية */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -20px, 0);
    }
    70% {
        transform: translate3d(0, -10px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

.result.show {
    animation: bounce 1s ease-in-out;
}

/* تحسينات للدولاب الجديد مع Winwheel.js */
#wheel-container {
    text-align: center;
    padding: 20px;
}

#wheel-info {
    margin-bottom: 20px;
}

#wheel-info h2 {
    color: #333;
    font-size: 1.8em;
    margin-bottom: 10px;
}

#wheel-info p {
    color: #666;
    font-size: 1.1em;
    margin: 5px 0;
}

#wheel-mode {
    font-weight: bold;
    color: #FF6B6B;
}

#canvas {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.spin-btn {
    background: linear-gradient(45deg, #FF6B6B, #ee5a24);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    margin-top: 20px;
}

.spin-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.spin-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.controls {
    text-align: center;
    padding: 20px;
    border-top: 1px solid #eee;
}

.admin-link {
    background: linear-gradient(45deg, #4ECDC4, #44A08D);
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    display: inline-block;
    margin: 5px;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

.admin-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.4);
}
