/* Arabic Contest Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    direction: rtl;
    text-align: right;
}

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

/* Header Styles */
.header {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.prize-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.prize-icons i {
    font-size: 3rem;
    color: #667eea;
    animation: bounce 2s infinite;
}

.prize-icons i:nth-child(2) {
    animation-delay: 0.3s;
}

.prize-icons i:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: 700;
}

.header-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 20px;
}

.contest-badge {
    display: inline-block;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 5px 15px rgba(238, 90, 36, 0.3);
}

/* Prizes Section */
.prizes-section {
    margin-bottom: 40px;
}

.prizes-section h2 {
    text-align: center;
    color: white;
    font-size: 2.2rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.prizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.prize-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
}

.prize-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.main-prize {
    border: 3px solid #667eea;
    position: relative;
    overflow: hidden;
}

.main-prize::before {
    content: '🏆 الجائزة الكبرى';
    position: absolute;
    top: -10px;
    right: -30px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-size: 0.9rem;
    font-weight: 600;
}

.prize-icon {
    font-size: 4rem;
    color: #667eea;
    margin-bottom: 20px;
}

.prize-card h3 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.prize-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 15px;
}

.prize-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.prize-features span {
    color: #666;
    font-size: 0.95rem;
}

.prize-features i {
    color: #667eea;
    margin-left: 8px;
}

.prize-value {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Registration Section */
.registration-section {
    margin-bottom: 40px;
}

.form-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.form-container h2 {
    text-align: center;
    color: #333;
    font-size: 2rem;
    margin-bottom: 20px;
}

.motivational-message {
    background: linear-gradient(45deg, #ffeaa7, #fdcb6e);
    color: #2d3436;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    border-right: 5px solid #fdcb6e;
    font-weight: 500;
}

.motivational-message i {
    color: #e17055;
    margin-left: 10px;
    font-size: 1.2rem;
}

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

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

.form-group label i {
    color: #667eea;
    margin-left: 8px;
}

.form-group input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.phone-input-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.country-code-select {
    padding: 15px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    min-width: 120px;
}

.country-code-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.phone-input-container input {
    flex: 1;
    margin: 0;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.submit-btn {
    width: 100%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.submit-btn i {
    margin-left: 10px;
}

/* How it Works */
.how-it-works {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.how-it-works h2 {
    text-align: center;
    color: #333;
    font-size: 2rem;
    margin-bottom: 30px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.step {
    text-align: center;
    padding: 20px;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.step-content h3 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.step-content p {
    color: #666;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.footer-links {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #764ba2;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    right: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: left;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #667eea;
}

.success-content {
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    color: #00b894;
    margin-bottom: 20px;
}

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

.share-section {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(45deg, #ffeaa7, #fdcb6e);
    border-radius: 15px;
}

.share-section h3 {
    color: #2d3436;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.share-message {
    color: #2d3436;
    margin-bottom: 20px;
    font-weight: 500;
}

.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 25px;
    border-radius: 12px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.share-btn i {
    margin-left: 10px;
    font-size: 1.2rem;
}

.whatsapp {
    background: linear-gradient(45deg, #25D366, #128C7E);
}

.facebook {
    background: linear-gradient(45deg, #1877F2, #166FE5);
}

.copy {
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.terms-content {
    text-align: right;
    line-height: 1.8;
}

.terms-content p {
    margin-bottom: 15px;
    color: #333;
}

/* Enhanced Success Animations */
.celebration-animation {
    position: relative;
    overflow: hidden;
}

.celebration-animation::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(76, 175, 80, 0.1) 0%, transparent 70%);
    animation: celebrationPulse 2s ease-out;
    pointer-events: none;
}

@keyframes celebrationPulse {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Confetti Animation */
.confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #FFD700;
    animation: confettiFall 3s linear forwards;
}

.confetti-piece:nth-child(2n) {
    background: #FF6B6B;
    animation-delay: 0.2s;
}

.confetti-piece:nth-child(3n) {
    background: #4ECDC4;
    animation-delay: 0.4s;
}

.confetti-piece:nth-child(4n) {
    background: #45B7D1;
    animation-delay: 0.6s;
}

.confetti-piece:nth-child(5n) {
    background: #96CEB4;
    animation-delay: 0.8s;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Success Modal Enhanced Animation */
.modal.show {
    display: flex;
    animation: modalFadeIn 0.5s ease-out;
}

.modal.show .modal-content {
    animation: modalSlideIn 0.5s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Button Success Animation */
.submit-btn.success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    animation: buttonSuccess 0.8s ease-out;
}

@keyframes buttonSuccess {
    0% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.05);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

/* Floating Success Icon */
.success-icon {
    display: inline-block;
    animation: floatIcon 2s ease-in-out infinite;
}

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

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 5px;
        padding: 15px;
        border-radius: 15px;
    }
    
    .hero {
        padding: 30px 0;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    .hero p {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 20px;
    }
    
    .prizes-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin: 20px 0;
    }
    
    .prize-card {
        padding: 20px;
        text-align: center;
    }
    
    .prize-card h3 {
        font-size: 1.3rem;
    }
    
    .contest-form {
        padding: 25px;
        margin: 20px 0;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .form-group input {
        padding: 15px;
        font-size: 1rem;
        border-radius: 10px;
    }
    
    .phone-input-container {
        flex-direction: column;
        gap: 12px;
    }
    
    .phone-input-container select {
        width: 100%;
        padding: 15px;
        font-size: 1rem;
        border-radius: 10px;
    }
    
    .submit-btn {
        width: 100%;
        padding: 18px;
        font-size: 1.2rem;
        border-radius: 12px;
        margin-top: 10px;
    }
    
    .features {
        padding: 30px 0;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-card {
        padding: 25px;
        text-align: center;
    }
    
    .footer {
        padding: 30px 0;
        text-align: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .container {
        margin: 2px;
        padding: 10px;
    }
    
    .hero h1 {
        font-size: 1.6rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .contest-form {
        padding: 20px;
    }
    
    .form-group input,
    .phone-input-container select {
        padding: 12px;
        font-size: 0.95rem;
    }
    
    .submit-btn {
        padding: 15px;
        font-size: 1.1rem;
    }
    
    .prize-card,
    .feature-card {
        padding: 20px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .submit-btn,
    .form-group input,
    .phone-input-container select {
        min-height: 48px; /* Apple's recommended touch target size */
    }
    
    .submit-btn:active {
        transform: scale(0.98);
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Success Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}
