* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a237e 0%, #283593 25%, #3949ab 50%, #5e35b1 75%, #7e57c2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.8;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    background: rgba(140, 170, 100, 0.98);
    border-radius: 28px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    border: 6px solid #7e57c2;
}

header {
    background: linear-gradient(135deg, #4a148c 0%, #6a1b9a 25%, #7b1fa2 50%, #8e24aa 75%, #9c27b0 100%);
    color: white;
    padding: 45px 35px;
    position: relative;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.header-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.ornament-left,
.ornament-right {
    font-size: 3em;
    color: #ffd54f;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

.header-main {
    flex: 1;
    text-align: center;
}

.islamic-symbol {
    font-size: 2.8em;
    margin: 12px 0;
    animation: glow 2.5s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 15px #fff, 0 0 25px #fff, 0 0 35px #ffd54f, 0 0 45px #ffd54f;
    }
    to {
        text-shadow: 0 0 25px #fff, 0 0 35px #ffd54f, 0 0 45px #ffd54f, 0 0 55px #ffd54f;
    }
}

header h1 {
    font-size: 3.2em;
    margin-bottom: 15px;
    text-shadow: 4px 4px 10px rgba(0, 0, 0, 0.5);
    letter-spacing: 3px;
    font-weight: 900;
}

.subtitle {
    font-size: 1.35em;
    opacity: 0.95;
    font-style: italic;
    margin-bottom: 8px;
    font-weight: 500;
}

.hadith-range {
    font-size: 1.25em;
    font-weight: 700;
    color: #ffd54f;
    margin: 10px 0;
    letter-spacing: 2px;
}

.respect-note {
    font-size: 1.2em;
    font-weight: 800;
    margin-top: 15px;
    color: #fff9c4;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
    letter-spacing: 1.5px;
}

.content-wrapper {
    display: flex;
    min-height: 750px;
}

.sidebar {
    width: 360px;
    background: linear-gradient(180deg, #f3e5f5 0%, #e1bee7 100%);
    padding: 32px;
    border-right: 6px solid #7e57c2;
    box-shadow: 6px 0 25px rgba(0, 0, 0, 0.2);
}

.sidebar-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 18px;
    border-bottom: 5px solid #7e57c2;
}

.sidebar-header h2 {
    color: #4a148c;
    font-size: 1.85em;
    font-weight: 900;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-subtitle {
    color: #6a1b9a;
    font-size: 1em;
    font-style: italic;
    font-weight: 600;
}

.hadith-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
}

.hadith-button {
    background: linear-gradient(135deg, #6a1b9a 0%, #8e24aa 100%);
    color: white;
    border: 4px solid #4a148c;
    padding: 20px 26px;
    border-radius: 18px;
    cursor: pointer;
    font-size: 1.15em;
    font-weight: 900;
    transition: all 0.45s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 7px 22px rgba(106, 27, 154, 0.6);
    text-align: center;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.hadith-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.7s, height 0.7s;
}

.hadith-button:hover::before {
    width: 200px;
    height: 200px;
}

.hadith-button:hover {
    transform: translateY(-6px) scale(1.04);
    box-shadow: 0 12px 35px rgba(106, 27, 154, 0.8);
    background: linear-gradient(135deg, #7b1fa2 0%, #9c27b0 100%);
    border-color: #9c27b0;
}

.hadith-button.active {
    background: linear-gradient(135deg, #d84315 0%, #ff6f00 100%);
    transform: scale(1.1);
    box-shadow: 0 14px 40px rgba(255, 111, 0, 0.7);
    border-color: #ffd54f;
    border-width: 5px;
}

.respect-box {
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
    border: 4px solid #fbc02d;
    border-radius: 15px;
    padding: 22px;
    box-shadow: 0 6px 18px rgba(251, 192, 45, 0.4);
}

.respect-box h3 {
    color: #f57f17;
    font-size: 1.15em;
    margin-bottom: 12px;
    text-align: center;
    font-weight: 800;
    text-transform: uppercase;
}

.respect-box p {
    color: #e65100;
    font-weight: 700;
    margin: 10px 0;
    font-size: 0.95em;
    line-height: 1.6;
}

.main-content {
    flex: 1;
    padding: 48px;
    background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
}

.welcome-message {
    text-align: center;
    color: #37474f;
    padding: 70px 35px;
}

.welcome-icon-container {
    position: relative;
    display: inline-block;
    margin-bottom: 25px;
}

.welcome-icon {
    font-size: 6em;
    position: relative;
    z-index: 2;
    animation: float 3.5s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-25px);
    }
}

.welcome-icon-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(126, 87, 194, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: pulse 2s ease-in-out infinite;
    z-index: 1;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.5;
    }
}

.welcome-message h2 {
    color: #4a148c;
    margin-bottom: 22px;
    font-size: 2.7em;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    font-weight: 900;
}

.welcome-description {
    font-size: 1.25em;
    margin-bottom: 35px;
    line-height: 2;
    color: #424242;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    margin-top: 45px;
}

.info-item {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border: 4px solid #7e57c2;
    border-radius: 18px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(126, 87, 194, 0.3);
}

.info-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.info-item h3 {
    color: #4a148c;
    margin-bottom: 12px;
    font-size: 1.5em;
    font-weight: 800;
}

.info-item p {
    color: #37474f;
    line-height: 1.8;
    font-size: 1.08em;
}

.hadith-display {
    animation: fadeInSlideUp 0.8s ease;
}

@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hadith-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-radius: 22px;
    padding: 42px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
    border: 5px solid #7e57c2;
}

.hadith-header {
    background: linear-gradient(135deg, #4a148c 0%, #6a1b9a 25%, #7b1fa2 50%, #8e24aa 75%, #9c27b0 100%);
    color: white;
    padding: 35px;
    border-radius: 18px;
    margin-bottom: 38px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(74, 20, 140, 0.6);
    position: relative;
    overflow: hidden;
}

.hadith-header::before {
    content: '☪️';
    position: absolute;
    font-size: 10em;
    opacity: 0.08;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hadith-number {
    font-size: 1.6em;
    font-weight: 900;
    margin-bottom: 12px;
    letter-spacing: 2px;
    color: #ffd54f;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.hadith-title {
    font-size: 2.4em;
    font-weight: 900;
    margin-bottom: 12px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 1;
}

.hadith-book {
    font-size: 1.15em;
    opacity: 0.95;
    font-style: italic;
    margin-top: 10px;
    position: relative;
    z-index: 1;
}

.hadith-section {
    margin-bottom: 32px;
    padding: 30px;
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border-radius: 16px;
    border-left: 8px solid #7e57c2;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    transition: transform 0.35s ease;
}

.hadith-section:hover {
    transform: translateX(8px);
}

.section-title {
    color: #4a148c;
    font-size: 1.6em;
    font-weight: 900;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 4px solid #7e57c2;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-content {
    color: #212121;
    font-size: 1.12em;
    line-height: 2.1;
    text-align: justify;
}

.narrator-info {
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
    padding: 22px;
    border-radius: 14px;
    font-weight: 700;
    color: #f57f17;
    margin-top: 18px;
    border: 4px solid #fbc02d;
    box-shadow: 0 5px 15px rgba(251, 192, 45, 0.5);
}

.respect-phrase {
    color: #d84315;
    font-style: italic;
    font-weight: 900;
    font-size: 1.05em;
    margin-top: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.narrator-chain {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 22px;
    border-radius: 14px;
    font-style: italic;
    color: #01579b;
    margin-top: 18px;
    border: 4px solid #2196f3;
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.4);
    font-weight: 700;
}

.arabic-text {
    font-size: 1.85em;
    text-align: center;
    font-weight: 900;
    color: #4a148c;
    padding: 28px;
    background: white;
    border-radius: 14px;
    border: 4px dashed #7e57c2;
    direction: rtl;
    box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.1);
}

footer {
    background: linear-gradient(135deg, #4a148c 0%, #7b1fa2 50%, #9c27b0 100%);
    color: white;
    text-align: center;
    padding: 35px;
    box-shadow: 0 -6px 25px rgba(0, 0, 0, 0.4);
}

.footer-content p {
    margin: 10px 0;
    line-height: 1.9;
}

.footer-title {
    font-size: 1.3em;
    margin-bottom: 8px;
}

.footer-title strong {
    color: #ffd54f;
    font-size: 1.2em;
}

.footer-note {
    font-style: italic;
    color: #fff9c4;
    margin-top: 12px;
    font-weight: 600;
}

@media (max-width: 1100px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 6px solid #7e57c2;
    }
    
    .hadith-list {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .hadith-button {
        flex: 1;
        min-width: 160px;
    }
    
    header h1 {
        font-size: 2.5em;
    }
    
    .main-content {
        padding: 35px;
    }
}

@media (max-width: 650px) {
    body {
        padding: 12px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .hadith-title {
        font-size: 1.8em;
    }
    
    .main-content {
        padding: 22px;
    }
    
    .hadith-card {
        padding: 28px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}