:root {
    --bg-color: #fdfaf6;
    --card-bg: #ffffff;
    --border-golden: #cda972;
    --border-light: #e9e5df;
    --text-dark: #2c3e50;
    --highlight-bg: #fff9c4;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #f4eee1;
    /* geometric islamic pattern background */
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d8cfba' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    font-family: 'Amiri', serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    color: var(--text-dark);
}

.app-container {
    background-color: var(--bg-color);
    width: 100%;
    max-width: 650px;
    border-radius: 8px;
    padding: 40px 20px;
    box-shadow: 
        0 15px 35px rgba(0,0,0,0.1),
        inset 0 0 0 4px var(--border-golden),
        inset 0 0 0 8px var(--bg-color),
        inset 0 0 0 10px var(--border-golden);
    text-align: center;
    position: relative;
    overflow: hidden;
}

header h1 {
    font-size: 2.4rem;
    color: #2c3e50;
    margin-bottom: 5px;
    line-height: 1.4;
}

header h2 {
    font-family: 'Nunito', sans-serif;
    font-size: 1.25rem;
    color: #5d6d7e;
    font-weight: 700;
    margin-bottom: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    border: none;
    border-radius: 50px;
    padding: 12px 28px;
    font-size: 1.1rem;
    font-family: 'Amiri', serif;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(253, 160, 133, 0.4);
    margin-bottom: 30px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(253, 160, 133, 0.5);
}

.btn:active {
    transform: translateY(1px);
}

.icon {
    width: 20px;
    height: 20px;
}

.qa-block {
    background: var(--card-bg);
    margin-bottom: 25px;
    padding: 25px 15px;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s forwards;
}

.qa-block:nth-child(1) { animation-delay: 0.1s; }
.qa-block:nth-child(2) { animation-delay: 0.2s; }
.qa-block:nth-child(3) { animation-delay: 0.3s; }
.qa-block:nth-child(4) { animation-delay: 0.4s; }
.qa-block:nth-child(5) { animation-delay: 0.5s; }
.qa-block:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qa-block:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transform: scale(1.02) !important;
}

.sentence {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 12px 0;
}

.sentence.arabic {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.5;
}

.sentence.french {
    direction: ltr;
    font-family: 'Nunito', sans-serif;
    font-size: 1.6rem;
    font-weight: 900;
    margin-top: 5px;
}

.word {
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
    user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.word:hover {
    background-color: #f7f9fa;
    transform: scale(1.05);
}

.word.highlighted {
    background-color: var(--highlight-bg);
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    z-index: 10;
    position: relative;
}

footer p {
    margin-top: 35px;
    color: #95a5a6;
    font-size: 1.1rem;
    border-top: 1px dashed var(--border-light);
    padding-top: 15px;
}

/* Responsiveness */
@media (max-width: 500px) {
    header h1 { font-size: 1.8rem; }
    header h2 { font-size: 1.1rem; }
    .sentence.arabic { font-size: 2.2rem; }
    .sentence.french { font-size: 1.25rem; }
    .app-container { padding: 30px 15px; }
    .word { padding: 4px 8px; }
}
