/* Language Selection and Rules Screen Styles */

/* Language Screen */
.language-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.5s ease-in;
    padding: 20px;
}

.language-screen h1 {
    font-size: 3rem;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.language-screen h2 {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    text-align: center;
}

.language-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    width: 100%;
}

.language-btn {
    padding: 1.2rem 2rem;
    font-size: 1.3rem;
    font-weight: bold;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
}

.language-btn:active {
    transform: translateY(-1px);
}

/* Rules Screen */
.rules-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #434343 0%, #000000 100%);
    display: flex;
    flex-direction: column;
    z-index: 9998;
    animation: fadeIn 0.5s ease-in;
    overflow-y: auto;
    color: white;
}

.rules-screen h1 {
    font-size: 2.5rem;
    color: white;
    margin: 2rem auto 1rem;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.rules-content {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px 100px;
    flex-grow: 1;
}

.rules-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.rules-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #ffd700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rules-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rules-section li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.rules-section li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #ffd700;
    font-weight: bold;
}

.rules-disclaimer {
    background: rgba(255, 107, 107, 0.2);
    border: 2px solid rgba(255, 107, 107, 0.5);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
    font-weight: bold;
}

.start-game-btn {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 3rem;
    font-size: 1.3rem;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 10;
    min-width: 250px;
}

.start-game-btn:hover {
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.start-game-btn:active {
    transform: translateX(-50%) translateY(-1px);
}

/* Language Change Modal */
.language-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-in;
}

.language-modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 2rem;
    max-width: 450px;
    width: 90%;
    position: relative;
    animation: slideUp 0.3s ease-out;
}

.language-modal-content h2 {
    color: white;
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.language-modal-content .language-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.language-modal-content .close-modal {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    transition: transform 0.2s;
}

.language-modal-content .close-modal:hover {
    transform: scale(1.2);
}

/* RTL Support for Arabic */
body.rtl {
    direction: rtl;
}

body.rtl .rules-section li {
    padding-left: 0;
    padding-right: 1.5rem;
}

body.rtl .rules-section li:before {
    left: auto;
    right: 0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .language-screen h1 {
        font-size: 2rem;
    }
    
    .language-screen h2 {
        font-size: 1.2rem;
    }
    
    .language-btn {
        font-size: 1.1rem;
        padding: 1rem 1.5rem;
    }
    
    .rules-screen h1 {
        font-size: 2rem;
    }
    
    .rules-section h3 {
        font-size: 1.3rem;
    }
    
    .start-game-btn {
        font-size: 1.1rem;
        padding: 0.9rem 2.5rem;
        min-width: 200px;
    }
}

@media (max-width: 480px) {
    .language-screen h1 {
        font-size: 1.5rem;
    }
    
    .language-screen h2 {
        font-size: 1rem;
    }
    
    .language-btn {
        font-size: 1rem;
        padding: 0.9rem 1.2rem;
        min-height: 50px;
    }
    
    .rules-content {
        padding: 0 15px 90px;
    }
    
    .rules-section {
        padding: 1rem;
    }
    
    .start-game-btn {
        font-size: 1rem;
        padding: 0.8rem 2rem;
        min-width: 180px;
        bottom: 10px;
    }
}
