* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* -------- BODY -------- */
body {
    font-family: 'Inter', sans-serif;
    background: #f9fafb;
    color: #111827;

    display: flex;
    flex-direction: column;

    min-height: 100vh;
}


/* -------- TITLE -------- */
header {
    padding: 40px 80px 20px;
}

header h1 {
    margin-top: 150px;
    font-size: 2rem;
    font-weight: 500;
    text-align: center;
}


/* -------- HADITH TEXT -------- */
#hadith-content {
    padding: 40px 10%;
}


#hadith-content p {
    font-size: 1.5rem;
    line-height: 2;
    font-weight: 300;

    text-align: left;   /* KEY CHANGE */
    max-width: 100%;    /* allow full width */
}


/* Loading */
.loading-text {
    color: #6b7280;
    font-style: italic;
}

/* -------- REFERENCE -------- */
#reference {
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 40px;
    text-align: center;
}


/* -------- BUTTON -------- */
button {
    display: block;
    margin: 40px auto;  

    background: #111827;
    color: white;
    border: none;
    padding: 14px 35px;
    font-size: 1rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease;
}



button:hover {
    background: #000;
    transform: translateY(-2px);
}

#metadata {
    padding: 0 80px;
    margin-bottom: 30px;
   
    text-align: center;
}



#reference {
    font-size: 0.95rem;
    color: #6b7280;
}


/* -------- HEADER -------- */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 20px 80px;
    border-bottom: 1px solid #e5e7eb;
    background: white;
}

.logo {
    font-weight: 600;
    font-size: 1.2rem;
}

nav a {
    margin-left: 30px;
    text-decoration: none;
    color: #374151;
    font-size: 0.95rem;
    transition: color 0.2s;
}

nav a:hover {
    color: #000;
}

.page {
    padding: 60px 80px;
    max-width: 700px;
    margin: auto;
}

.page h1 {
    margin-bottom: 30px;
    font-weight: 500;
}

/* Form */
form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

input, textarea {
    padding: 12px 15px;
    font-size: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    outline: none;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

input:focus, textarea:focus {
    border-color: #111827;
}

.links {
    margin-top: 20px;
    display: flex;
    gap: 20px;
}

.links a {
    text-decoration: none;
    color: #2563eb;
    font-size: 0.95rem;
}

.links a:hover {
    text-decoration: underline;
}

:root {
    --bg: #f9fafb;
    --text: #111827;
}

body {
    background: var(--bg);
    color: var(--text);
    transition: background 0.4s ease, color 0.4s ease;
}

/* Dark Mode */
body.dark,
html.dark {
    --bg: #0f172a;
    --text: #e5e7eb;
}

.theme-toggle {
    position: absolute;
    top: 80px;
    right: 80px;
}

#theme-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#theme-btn:hover {
    transform: rotate(20deg);
}

#stars,#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Show stars in dark mode */
body.dark,
html.dark #stars {
    opacity: 1;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    animation: twinkle 2s infinite ease-in-out;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

body.dark,
html.dark #hadith-content p {
    color: #e5e7eb;
}

body.dark,
html.dark #reference {
    color: #94a3b8;
}

body.dark,
html.dark #reference {
    color: #94a3b8;
}

/* Light particles container */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    pointer-events: none;
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* Hide in dark mode */
body.dark #particles {
    opacity: 0;
}

/* Particle style */
.particle {
    position: absolute;
    width: 6px;
    height: 6px;

    background: rgba(255, 200, 100, 0.2);
    border-radius: 50%;

    filter: blur(2px);

    animation: float 8s infinite ease-in-out;
}

/* Floating animation */
@keyframes float {
    0% {
        transform: translateY(0);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-20px);
        opacity: 0.6;
    }
    100% {
        transform: translateY(0);
        opacity: 0.3;
    }
}

body.dark .site-header {
    background: white;
    color: #111827;
}

body.dark .logo {
    color: #111827;
}

body.dark .site-header nav a {
    color: #374151;
}

.site-header {
    background: white;
    color: #111827;
    z-index: 10;
}

/* Force logo color */
.logo {
    color: #111827;
}

button {
    background: #111827;
    color: white;
}

body.dark button {
    background: #f9fafb;   /* light button */
    color: #111827;
}

body.dark button:hover {
    background: #e5e7eb;
}

body.dark button {
    background: #b8bdc7;
    color: #f9fafb;
    border: 1px solid #334155;
}

body.dark button:hover {
    background: #334155;
}

body.dark .social-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #e5e7eb;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.instagram:hover {
    background: rgba(236, 72, 153, 0.15);
    color: #ec4899;
}

.linkedin:hover {
    background: rgba(14, 164, 233, 0.788);
    color: #0284c7;
}

.github:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #111827;
}


.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.site-header {
    position: sticky;
    top: 0;
}

.social-buttons {
    margin-top: 30px;
    display: flex;
    gap: 15px;              /* spacing between buttons */
    flex-wrap: wrap;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 10px 18px;
    border-radius: 999px;

    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;

    background: #f3f4f6;
    color: #111827;

    border: 1px solid #e5e7eb;

    transition: all 0.3s ease;
}

body.dark .social-btn {
    background: #1e293b;
    color: #e5e7eb;
    border: 1px solid #334155;
}
.social-btn i {
    color: inherit;
}


/* Hover effect */
.social-btn:hover {
    transform: translateY(-2px);
}

/* Individual colors */
.instagram:hover {
    background: #fce7f3;
    color: #be185d;
}



.linkedin:hover {
    background: #e0f2fe;
    color: #0369a1;
}

.github:hover {
    background: #e5e7eb;
    color: #111827;
}

form button {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;

    padding: 12px;
    border-radius: 8px;

    font-size: 1rem;
    cursor: pointer;

    transition: all 0.3s ease;
}

/* Hover */
form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

body.dark form button {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
}

.social-buttons {
    margin-top: 20px;   /* pushes buttons down */
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}
.page p {
    margin-bottom: 20px;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 20px 80px;
    border-bottom: 1px solid #e5e7eb;
    background: white;

    position: relative;
}

.logo {
    font-weight: 600;
    font-size: 1.2rem;
}

nav {
    display: flex;
}

nav a {
    margin-left: 30px;
    text-decoration: none;
    color: #374151;
    font-size: 0.95rem;
}

.hamburger {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
}

@media (max-width: 768px) {

    /* HEADER */
    .site-header {
        padding: 15px 20px;
    }

    /* Center logo */
    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    /* Hamburger visible */
    .hamburger {
        display: block;
    }

    /* Hide nav by default */
    nav {
        position: absolute;
        top: 60px;
        right: 20px;

        flex-direction: column;

        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 10px;

        padding: 15px;

        display: none;
    }

    /* Show menu when active */
    nav.active {
        display: flex;
    }

    nav a {
        margin: 10px 0;
    }

    /* Theme button */
    #theme-btn {
        margin-left: auto;
    }

    /* HADITH TEXT */
    #hadith-content {
        padding: 20px;
    }

    #hadith-content p {
        font-size: 1.2rem;
        line-height: 1.8;
    }

    /* TITLE */
    .title {
        margin-top: 100px;
        font-size: 1.5rem;
        padding: 0 20px;
    }

    /* PAGE CONTENT */
    .page {
        padding: 40px 20px;
    }

    /* SOCIAL BUTTONS */
    .social-buttons {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .social-btn {
        width: fit-content;
    }
}

@media (max-width: 768px) {

    .theme-toggle {
        position: static;           /* remove absolute */
        display: flex;
        justify-content: center;    /* center horizontally */

        margin-top: 15px;
    }

}
@media (max-width: 768px) {

    .theme-toggle {
        margin: 0;
    }

}
@media (max-width: 768px) {

    .theme-toggle {
        display: flex;
        justify-content: center;
    }

    #theme-btn {
        background: rgba(0,0,0,0.05);
        padding: 8px 12px;
        border-radius: 999px;
    }

    body.dark #theme-btn {
        background: rgba(255,255,255,0.1);
    }

}
@media (max-width: 768px) {

    header h1 {
        margin-top: 0px;   /* smaller for mobile */
    }

}
@media (max-width: 768px) {

    header h1 {
        margin-top: 0px;
    }

}
.status {
    margin-top: 20px;
    font-size: 0.85rem;
    padding: 6px 14px;
    border-radius: 999px;
    display: inline-block;
    font-weight: 500;
}

/* Sahih (Green) */
.status-sahih {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

/* Hasan (Yellow) */
.status-hasan {
    background: rgba(250, 204, 21, 0.2);
    color: #ca8a04;
}

/* Daif (Red) */
.status-daif {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

/* Unknown */
.status-unknown {
    background: rgba(148, 163, 184, 0.2);
    color: #64748b;
}
body.dark .status-sahih {
    color: #4ade80;
}

body.dark .status-hasan {
    color: #fde047;
}

body.dark .status-daif {
    color: #f87171;
}
