/* === GAYA ASAS Laman Web === */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;800&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    /* Latar belakang pelbagai warna animasi */
    background: linear-gradient(45deg, #d1fae5, #e0f2fe, #fef3c7, #ccfbf1);
    background-size: 400% 400%;
    animation: gradientGerak 15s ease infinite;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@keyframes gradientGerak {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* === HALAMAN PENGENALAN (KUMPULAN) === */
#intro-page {
    text-align: center;
    padding: 50px 20px;
    width: 100%;
    max-width: 1000px;
}

#intro-page h1 {
    color: #047857; 
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 2px 2px 10px rgba(255,255,255,0.5);
}

#intro-page p.subtitle {
    font-size: 18px;
    color: #555;
    margin-bottom: 40px;
}

/* Susunan Kad Ahli Bersebelahan */
.members-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
}

.member-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    border-radius: 15px;
    padding: 20px;
    width: 250px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    text-align: left;
    border-top: 5px solid #059669;
}

.member-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 15px 30px rgba(5, 150, 105, 0.15);
}

.member-card h3 {
    margin: 0 0 5px 0;
    color: #047857;
    font-size: 18px;
}

.member-card p {
    margin: 0;
    color: #718096;
    font-weight: 600;
    font-size: 14px;
}

/* Butang Masuk / Mula */
.start-btn {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.3);
    transition: all 0.3s ease;
}

.start-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 25px rgba(4, 120, 87, 0.4);
}

/* === HALAMAN UTAMA (KANDUNGAN ARAB) === */
#main-page {
    display: none;
    text-align: center;
    padding: 50px 20px;
    width: 100%;
    max-width: 900px;
    animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* REKAAN BARU: Tajuk Utama */
.main-title {
    font-weight: 800;
    color: #064e3b;
    font-size: 38px;
    letter-spacing: 3px;
    margin-bottom: 50px;
    text-transform: uppercase;
    text-shadow: 2px 2px 15px rgba(255,255,255,0.8);
}

/* REKAAN BARU: Susunan Butang 3 Kategori */
.button-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

/* REKAAN BARU: Butang 3D dengan Kesan Cahaya (Shine) */
.category-btn {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 40px 30px;
    font-size: 26px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 15px 25px rgba(4, 120, 87, 0.2), inset 0 4px 6px rgba(255,255,255,0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 240px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Animasi Cahaya Melintas pada Butang */
.category-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    transition: all 0.6s ease;
}

.category-btn:hover::before {
    left: 150%;
}

.category-btn:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 35px rgba(4, 120, 87, 0.4), inset 0 4px 6px rgba(255,255,255,0.4);
    background: linear-gradient(135deg, #059669 0%, #022c22 100%);
}

/* Paparan Kandungan */
#content-display {
    margin-top: 50px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    text-align: left;
    display: none;
    animation: fadeIn 0.5s ease-in-out;
    border: 1px solid rgba(255,255,255,0.5);
}

#content-title {
    color: #047857;
    border-bottom: 3px solid #d1fae5;
    padding-bottom: 15px;
    margin-top: 0;
    font-size: 28px;
    font-weight: 800;
}

h4 {
    color: #2d3748;
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 20px;
}

.rules-text {
    line-height: 1.8;
    color: #4a5568;
    background: #f8fafc;
    padding: 20px;
    border-left: 5px solid #10b981;
    border-radius: 0 8px 8px 0;
    margin-bottom: 30px;
    font-size: 16px;
}

.arabic-text {
    font-size: 32px;
    font-weight: bold;
    text-align: right;
    direction: rtl;
    color: #064e3b;
    margin: 15px 0;
    padding: 20px;
    background: linear-gradient(to left, #ecfdf5, #ffffff);
    border-radius: 12px;
    border-right: 4px solid #059669;
}

.rumi-text {
    text-align: center;
    color: #718096;
    font-style: italic;
    margin-bottom: 25px;
    font-size: 16px;
}

/* REKAAN BARU: Butang Kembali */
.back-btn {
    background: white;
    color: #047857;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 50px;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.back-btn:hover {
    background: #047857;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(4, 120, 87, 0.2);
}

/* === SKRIN MASUK (WELCOME OVERLAY) === */
#welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #022c22 0%, #065f46 100%); 
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease;
}

.welcome-content {
    text-align: center;
    color: white;
    padding: 50px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
}

.welcome-content h1.arabic-welcome {
    font-size: 65px;
    color: #fcd34d;
    margin-bottom: 0px;
    margin-top: 0px;
    font-weight: bold;
    text-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.welcome-content h2.rumi-welcome {
    font-size: 28px;
    color: #ffffff;
    margin-top: 10px;
    margin-bottom: 25px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.enter-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); 
    color: #ffffff;
    border: none;
    padding: 18px 45px;
    font-size: 22px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 20px rgba(217, 119, 6, 0.4);
}

.enter-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 25px rgba(217, 119, 6, 0.6);
}
/* ========================================================
   REKAAN KANDUNGAN NOTA KHAS (ISIM, FI'IL, HARFI)
   ======================================================== */
.nota-header {
    background: linear-gradient(to right, #10b981, #059669);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-size: 22px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.2);
}

.nota-section-title {
    color: #047857;
    border-bottom: 2px dashed #a7f3d0;
    padding-bottom: 10px;
    margin-top: 30px;
    font-size: 22px;
}

/* Susunan Kategori Isim (Ditukar ke Flexbox supaya kotak terakhir duduk tengah) */
.grid-kategori {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.kad-kategori {
    flex: 1 1 200px; /* Boleh membesar dan mengecil dengan minimum 200px */
    max-width: 260px; /* Menghalang kotak tunggal dari menjadi terlalu memanjang */
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: transform 0.3s, box-shadow 0.3s;
    border-bottom: 4px solid #34d399;
}
.kad-kategori:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(16, 185, 129, 0.1);
}

.kad-kategori .jenis {
    font-size: 14px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 10px;
}

.kad-kategori .arab {
    font-size: 28px;
    color: #064e3b;
    font-weight: bold;
    margin: 5px 0;
}

.kad-kategori .maksud {
    font-size: 15px;
    color: #ef4444; /* Warna merah lembut untuk maksud */
    font-style: italic;
}

/* Susunan Senarai Tanda-tanda Isim */
.senarai-tanda {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.kad-tanda {
    background: #f8fafc;
    border-left: 5px solid #059669;
    padding: 15px 20px;
    border-radius: 0 12px 12px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kad-tanda-header {
    font-size: 18px;
    font-weight: bold;
    color: #0f172a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kad-tanda-arab {
    font-size: 24px;
    color: #047857;
    font-weight: bold;
    text-align: right;
    direction: rtl;
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.kad-tanda-maksud {
    text-align: right;
    color: #64748b;
    font-style: italic;
    font-size: 15px;
}
/* ========================================================
   ANIMASI SCROLL (MUNCUL PERLAHAN-LAHAN BILA DI-SCROLL)
   ======================================================== */
.animasi-scroll {
    opacity: 0; /* Ghaib pada mulanya */
    transform: translateY(40px); /* Berada sedikit di bawah */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animasi-scroll.muncul {
    opacity: 1; /* Muncul sepenuhnya */
    transform: translateY(0); /* Kembali ke kedudukan asal */
}
/* ========================================================
   REKAAN SUB-MENU (DASHBOARD KATEGORI ISIM) - SUSUNAN 2x2 TETAP
   ======================================================== */
.grid-submenu {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* MEMAKSA TEPAT 2 KOTAK KIRI & KANAN */
    gap: 20px;
    margin: 30px auto;
    max-width: 650px; /* Saiz keseluruhan ruang menu dibesarkan sedikit */
}

.kad-submenu {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    border: 2px solid #10b981;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.1);
}

.kad-submenu:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 25px rgba(16, 185, 129, 0.25);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.kad-submenu:hover .sub-arab, .kad-submenu:hover .sub-rumi {
    color: white;
}

.sub-arab {
    font-size: 35px;
    font-weight: bold;
    color: #047857;
    margin-bottom: 5px;
    transition: color 0.3s;
}

.sub-rumi {
    font-size: 15px;
    color: #475569;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

/* Butang kembali khas di dalam sub-menu */
.back-sub-btn {
    background: #f1f5f9;
    color: #475569;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 20px;
    transition: background 0.3s;
}
.back-sub-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}