/* ==========================================================================
   Toolstrem Fazil CGPA Calculator v10.0 - Islamic Arabic University (IAU) Edition
   Pure Vanilla CSS | 100% Mobile Friendly | High DPI Graphics & Animations
   ========================================================================== */

:root {
    --fazil-purple: #7c3aed;
    --fazil-purple-dark: #6d28d9;
    --fazil-emerald: #10b981;
    --fazil-emerald-dark: #059669;
    --fazil-bg-light: #f8fafc;
    --fazil-card-bg: #ffffff;
    --fazil-border: #e2e8f0;
    --fazil-text-main: #0f172a;
    --fazil-text-muted: #64748b;
    --fazil-radius: 20px;
    --fazil-shadow: 0 10px 30px rgba(124, 58, 237, 0.08);
}

[data-theme="dark"] {
    --fazil-bg-light: #0b0f17;
    --fazil-card-bg: #151d2a;
    --fazil-border: #2a364f;
    --fazil-text-main: #f8fafc;
    --fazil-text-muted: #94a3b8;
}

.fazil-app-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--fazil-text-main);
    background: var(--fazil-bg-light);
    min-height: 100vh;
    padding-bottom: 4rem;
}

.fazil-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Hero Section */
.fazil-hero-card {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.06), rgba(16, 185, 129, 0.05));
    border: 1px solid var(--fazil-border);
    border-radius: 24px;
    padding: 2.75rem 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    margin-bottom: 2rem;
}

.fazil-hero-h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 900;
    color: var(--fazil-text-main);
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.fazil-hero-h1 span {
    background: linear-gradient(135deg, #7c3aed, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fazil-hero-sub {
    font-size: 1.1rem;
    color: var(--fazil-text-muted);
    max-width: 800px;
    margin: 0 auto 1.25rem auto;
    line-height: 1.6;
}

.fazil-badges-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.fazil-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--fazil-card-bg);
    border: 1px solid var(--fazil-border);
    color: var(--fazil-text-main);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

/* Program Selector Grid */
.fazil-prog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
    .fazil-prog-grid {
        grid-template-columns: 1fr;
    }

    .yearly-gpa-4grid {
        grid-template-columns: 1fr !important;
    }
}

.fazil-prog-card {
    background: var(--fazil-card-bg);
    border: 1.5px solid var(--fazil-border);
    border-radius: 16px;
    padding: 18px 20px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 16px;
    user-select: none;
}

.fazil-prog-card:hover {
    border-color: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.12);
}

.fazil-prog-card.active {
    border: 2px solid #7c3aed !important;
    background: rgba(124, 58, 237, 0.04);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12) !important;
}

/* Related Tools Grid & Cards */
.nu-related-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    margin-top: 24px !important;
    width: 100% !important;
}

@media (max-width: 991px) {
    .nu-related-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 576px) {
    .nu-related-grid {
        grid-template-columns: 1fr !important;
    }
}

.related-tool-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 100% !important;
    text-align: left !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
    transition: all 0.25s ease !important;
}

.related-tool-card:hover {
    transform: translateY(-4px) !important;
    border-color: #7c3aed !important;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.15) !important;
}

body.dark-mode .related-tool-card,
body.dark-theme .related-tool-card,
[data-theme="dark"] .related-tool-card {
    background: #151d2a !important;
    border-color: #2a364f !important;
    color: #ffffff !important;
}

body.dark-mode .nu-input-card,
body.dark-theme .nu-input-card,
[data-theme="dark"] .nu-input-card {
    background: #151d2a !important;
    border-color: #2a364f !important;
    color: #f8fafc !important;
}

body.dark-mode .nu-prog-title,
body.dark-theme .nu-prog-title,
[data-theme="dark"] .nu-prog-title,
body.dark-mode .font-weight-extrabold,
body.dark-theme .font-weight-extrabold,
[data-theme="dark"] .font-weight-extrabold,
body.dark-mode .gpa-input-box-unit label,
body.dark-theme .gpa-input-box-unit label,
[data-theme="dark"] .gpa-input-box-unit label {
    color: #ffffff !important;
}

body.dark-mode .nu-prog-sub,
body.dark-theme .nu-prog-sub,
[data-theme="dark"] .nu-prog-sub,
body.dark-mode .text-gray-500,
body.dark-theme .text-gray-500,
[data-theme="dark"] .text-gray-500,
body.dark-mode .text-gray-400,
body.dark-theme .text-gray-400,
[data-theme="dark"] .text-gray-400 {
    color: #94a3b8 !important;
}

body.dark-mode .fazil-prog-card,
body.dark-theme .fazil-prog-card,
[data-theme="dark"] .fazil-prog-card {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-mode .fazil-prog-card.active,
body.dark-theme .fazil-prog-card.active,
[data-theme="dark"] .fazil-prog-card.active {
    background: rgba(124, 58, 237, 0.25) !important;
    border-color: #a78bfa !important;
    box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.2) !important;
}

body.dark-mode .nu-gpa-field-control,
body.dark-theme .nu-gpa-field-control,
[data-theme="dark"] .nu-gpa-field-control {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #ffffff !important;
}

body.dark-mode table tbody td,
body.dark-theme table tbody td,
[data-theme="dark"] table tbody td {
    color: #ffffff !important;
}
