* {
    margin: 0;
    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;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* رسالة تحذير الجهاز */
.device-warning {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.warning-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    margin: 20px;
}

.warning-content .warning-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.warning-content h2 {
    color: #333;
    margin-bottom: 15px;
}

.warning-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
}

.warning-content button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.warning-content button:hover {
    background-color: #2980b9;
}

/* نافذة التهنئة المنبثقة */
.modal {
    display: block;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.5s ease;
    position: relative;
}

.close {
    color: #aaa;
    float: left;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 10px;
    left: 20px;
}

.close:hover,
.close:focus {
    color: #000;
}

.trophy-icon {
    font-size: 60px;
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

.modal-content h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 28px;
}

.prize-amount {
    color: #27ae60;
    font-weight: bold;
    font-size: 24px;
}

.card-number-container {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.card-number {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    letter-spacing: 3px;
    margin-top: 10px;
}

.continue-btn {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 18px;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.continue-btn:hover {
    background-color: #219a52;
}

/* نافذة التحذير */
.warning-modal {
    background-color: #fff3cd;
    border: 2px solid #ffeaa7;
}

.warning-icon-large {
    font-size: 60px;
    margin-bottom: 20px;
}

.warning-text {
    color: #856404;
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.warning-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.understand-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.understand-btn:hover {
    background-color: #218838;
}

.cancel-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.cancel-btn:hover {
    background-color: #c82333;
}

/* المحتوى الرئيسي */
.main-container {
    display: none;
    width: 100%;
    max-width: 600px;
    padding: 20px;
}

.upload-section {
    background-color: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.upload-section h1 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.card-display {
    background-color: #f0f0f0;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 30px;
}

.card-number-large {
    font-size: 32px;
    font-weight: bold;
    color: #2c3e50;
    letter-spacing: 4px;
    margin-top: 10px;
}

.instructions {
    background-color: #e8f4fd;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-right: 4px solid #3498db;
}

.instructions h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.instructions ol {
    padding-right: 20px;
}

.instructions li {
    margin-bottom: 10px;
    color: #555;
}

kbd {
    background-color: #f4f4f4;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.upload-area {
    border: 3px dashed #3498db;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #2980b9;
    background-color: #f8f9fa;
}

#fileInput {
    display: none;
}

.upload-label {
    cursor: pointer;
    display: block;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.upload-label p {
    color: #7f8c8d;
    font-size: 18px;
}

.upload-status {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    display: none;
}

.upload-status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.upload-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* صفحة المحفظة */
.wallet-container {
    width: 100%;
    max-width: 600px;
    padding: 20px;
}

.wallet-section {
    background-color: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.wallet-section h1 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.success-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 30px;
}

.success-icon {
    font-size: 30px;
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #3498db;
}

.form-hint {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

.network-info {
    background-color: #e8f4fd;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 25px;
    border-right: 4px solid #3498db;
}

.network-info p {
    color: #2c3e50;
    margin: 0;
}

.submit-btn {
    width: 100%;
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 15px;
    font-size: 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #219a52;
}

.final-status {
    text-align: center;
    padding: 40px 20px;
}

.success-icon-large {
    font-size: 80px;
    margin-bottom: 20px;
}

.final-status h2 {
    color: #27ae60;
    margin-bottom: 15px;
}

.final-status p {
    color: #666;
    font-size: 18px;
}

/* الحركات */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

/* استجابة للشاشات الصغيرة */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .upload-section,
    .wallet-section {
        padding: 20px;
    }
    
    .card-number-large {
        font-size: 24px;
    }
    
    .warning-buttons {
        flex-direction: column;
    }
    
    .warning-buttons button {
        width: 100%;
    }
}