/* ===== RESET & BASICS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
    color: #333;
    overflow-x: hidden;
}

/* ===== APP CONTAINER ===== */
.app {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== SCREENS ===== */
.screen {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    animation: fadeIn 0.3s ease-in;
}

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

/* ===== LANGUAGE SELECTION SCREEN ===== */
.language-screen {
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #e6f2ff 0%, #f5fbff 100%);
    gap: 30px;
}

.language-container {
    width: 100%;
    max-width: 500px;
    text-align: center;
}

.main-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: #0066cc;
    margin-bottom: 10px;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.choose-language-text {
    font-size: 1.5rem;
    color: #444;
    margin-bottom: 30px;
    font-weight: 500;
}

.language-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    width: 100%;
}

.language-btn {
    padding: 25px 20px;
    font-size: 1.3rem;
    font-weight: 600;
    border: 3px solid #0066cc;
    background: white;
    color: #0066cc;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.1);
}

.language-btn:hover {
    background: #e6f2ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
}

.language-btn:active {
    transform: translateY(0);
    background: #cce5ff;
}

.lang-code {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0066cc;
}

.lang-name {
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}

/* ===== CONTENT SCREEN ===== */
.content-screen {
    padding: 15px;
    gap: 15px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
}

.step-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #0066cc;
    line-height: 1.3;
    flex: 1;
}

.change-language-btn {
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    align-self: flex-start;
}

.change-language-btn:hover {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.change-language-btn:active {
    transform: translateY(0);
}

/* ===== STEP COUNTER ===== */
.step-counter {
    padding: 12px 16px;
    background: #e6f2ff;
    border-left: 4px solid #0066cc;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #0066cc;
}

/* ===== CONTENT CONTAINER ===== */
.content-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    justify-content: center;
    align-items: center;
}

.step-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 2px solid #e6f2ff;
    background: white;
}

.step-description {
    font-size: 1.3rem;
    line-height: 1.6;
    color: #555;
    text-align: center;
    max-width: 600px;
    margin: 10px 0;
}

/* ===== NAVIGATION ===== */
.navigation {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.nav-btn {
    padding: 18px 32px;
    font-size: 1.2rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
    flex: 1;
    min-width: 140px;
}

.nav-btn-next {
    background: #0066cc;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.nav-btn-next:hover {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.4);
}

.nav-btn-next:active {
    transform: translateY(0);
}

.nav-btn-back {
    background: #f0f0f0;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-btn-back:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-btn-back:active {
    transform: translateY(0);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large devices (landscape) */
@media (min-width: 768px) {
    .language-buttons {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .main-title {
        font-size: 3.5rem;
    }

    .header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .step-title {
        flex: 1;
    }

    .change-language-btn {
        align-self: center;
        flex-shrink: 0;
    }

    .navigation {
        justify-content: center;
        gap: 20px;
    }

    .nav-btn {
        flex: 0 1 auto;
        min-width: 180px;
    }
}

/* Extra large devices */
@media (min-width: 1024px) {
    .content-screen {
        max-width: 1000px;
    }

    .step-image {
        max-width: 700px;
    }

    .step-description {
        font-size: 1.5rem;
    }

    .nav-btn {
        padding: 20px 40px;
        font-size: 1.3rem;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ===== PRINT ===== */
@media print {
    .header,
    .navigation,
    .change-language-btn {
        display: none;
    }

    .content-screen {
        page-break-after: always;
    }
}

/* ===== RTL Support (for Arabic) ===== */
[dir="rtl"] .header {
    flex-direction: row-reverse;
}

[dir="rtl"] .change-language-btn {
    align-self: flex-end;
}

[dir="rtl"] .step-counter {
    border-left: none;
    border-right: 4px solid #0066cc;
    text-align: right;
}

[dir="rtl"] .navigation {
    direction: rtl;
}
