/* Custom 99 Names Header */
.names-header {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 2rem 1rem;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    text-align: center;
}

.names-header h1 {
    font-size: 2.5rem;
    font-family: 'Amiri', serif;
    color: #ecf0f1;
    margin: 0;
}

.names-header p {
    font-size: 1.2rem;
    color: #ecf0f1;
    margin: 0;
}

/* Back link styling */
.back-link {
    display: inline-block;
    color: #ecf0f1;
    text-decoration: none;
    background: rgba(255,255,255,0.1);
    padding: 8px 15px;
    border-radius: 20px;
    margin-bottom: 1rem;
    transition: background 0.3s ease;
}

.back-link:hover {
    background: rgba(255,255,255,0.2);
    color: #ecf0f1;
}

.arabic-title {
    font-size: 4rem;
    color: #ecf0f1;
    font-family: 'Amiri', serif;
    margin: 0;
}

/* Name page specific containers */
.name-details-container {
    padding-top: 20px;
}

.name-card {
    padding: 30px 0;
    max-width: 800px;
    margin: 0 auto 20px auto;
    border-bottom: 1px solid #dee2e6;
    text-align: center;
}

.name-card h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-top: 0;
    color: #ad5207;
}

.meaning {
    font-size: 1.2rem;
    color: #16a085;
    font-style: italic;
}

/* Audio Player */
.audio-player {
    margin: 20px 0;
}

.listen-btn {
    background-color: #16a085;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(22, 160, 133, 0.3);
}

.listen-btn:hover {
    background-color: #148f77;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(22, 160, 133, 0.4);
}

.listen-btn.playing {
    background-color: #e74c3c;
}

.listen-btn.playing:hover {
    background-color: #c0392b;
}

.play-icon {
    width: 16px;
    height: 16px;
}

.hidden-audio {
    display: none;
}

/* Navigation arrows */
.name-navigation {
    display: flex;
    justify-content: space-between;
    max-width: 800px;
    margin: 0 auto 20px auto;
}

.nav-arrow {
    background-color: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
}

.nav-arrow:hover {
    background-color: #16a085;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border-color: #16a085;
    text-decoration: none;
}

.nav-hidden {
    visibility: hidden;
}

/* Tabs Container */
.tabs-container {
    max-width: 800px;
    margin: 20px auto 0;
}

.tab-buttons-wrapper {
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid #dee2e6;
}

.tab-buttons {
    display: flex;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    gap: 10px;
}

.tab-button {
    padding: 10px 20px;
    cursor: pointer;
    border: none;
    background-color: transparent;
    font-size: 1rem;
    font-weight: 600;
    color: #7f8c8d;
    margin-bottom: -2px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-button.active {
    color: #16a085;
    border-color: #16a085;
}

/* Tab indicators for mobile */
.tab-indicators {
    display: none;
    justify-content: center;
    gap: 5px;
    margin-top: 10px;
}

.tab-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dee2e6;
    cursor: pointer;
    transition: background 0.3s ease;
}

.tab-indicator.active {
    background: #16a085;
}

.tab-content {
    padding: 30px 0;
    text-align: left;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.5s;
}

.tab-pane.active {
    display: block;
}

.tab-pane h3 {
    margin-top: 0;
    color: #ad5207;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* FAQ Styles in tabs */
.tab-pane .faq-item {
    border-bottom: 1px solid #dee2e6;
    padding: 15px 0;
}

.tab-pane .faq-item:last-child {
    border-bottom: none;
}

.tab-pane .faq-question {
    width: 100%;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 10px 0;
    cursor: pointer;
    color: #333;
}

.tab-pane .faq-icon {
    font-size: 1.5rem;
    color: #16a085;
    transition: transform 0.3s ease;
}

.tab-pane .faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}

.tab-pane .faq-answer p {
    padding: 10px 0 15px 0;
    color: #555;
    line-height: 1.7;
}

.tab-pane .faq-item.active .faq-answer {
    max-height: 200px;
}

.tab-pane .faq-item.active .faq-icon {
    transform: rotate(45deg);
}

/* Quiz Styles */
.quiz-container p {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.quiz-options {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.quiz-options li {
    margin-bottom: 10px;
}

.quiz-options label {
    display: block;
    background: rgba(255, 255, 255, 0.5);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-options label:hover {
    border-color: #16a085;
    background: rgba(255, 255, 255, 0.8);
}

.quiz-options input[type="radio"] {
    margin-right: 10px;
}

.quiz-submit-btn {
    background-color: #2c3e50;
    color: #fff;
    border: none;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.quiz-submit-btn:hover {
    background-color: #16a085;
}

#quiz-result {
    margin-top: 20px;
    font-weight: 600;
    padding: 10px;
    border-radius: 5px;
}

.correct {
    color: #16a085;
    background-color: rgba(22, 160, 133, 0.1);
}

.incorrect {
    color: #c0392b;
    background-color: rgba(192, 57, 43, 0.1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .names-header {
        padding: 1.5rem 0.5rem;
    }

    .names-header h1 {
        font-size: 2rem;
    }

    .tab-buttons-wrapper {
        overflow: hidden;
        position: relative;
        padding: 0 10px;
        touch-action: pan-x;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-buttons {
        flex-wrap: nowrap;
        gap: 8px;
        width: max-content;
        will-change: transform;
    }
    
    .tab-indicators {
        display: flex;
    }
    
    .tab-button {
        min-width: 90px;
        padding: 12px 14px;
        font-size: 0.9rem;
        flex-shrink: 0;
        white-space: nowrap;
        user-select: none;
        -webkit-user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    .tab-content {
        padding: 20px 5px;
    }

    .arabic-title {
        font-size: 2.5rem;
    }

    .name-card {
        padding: 20px 5px;
    }

    .name-navigation {
        padding: 0 10px;
        margin: 0 auto 15px auto;
    }

    .nav-arrow {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .quiz-options label {
        padding: 12px;
        margin: 0 5px;
    }

    .quiz-submit-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .names-header {
        padding: 1rem 0.5rem;
    }

    .names-header h1 {
        font-size: 1.8rem;
    }

    .tab-button {
        min-width: 80px;
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .tab-content {
        padding: 15px 0;
    }

    .name-card {
        padding: 15px 0;
    }

    .arabic-title {
        font-size: 2rem;
    }

    .meaning {
        font-size: 1.1rem;
    }

    .nav-arrow {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}