/* ==========================================================================
   BSH OPPE Practice Lab & HackerRank Integration Master Stylesheet
   File: assets/css/oppe-portal.css
   ========================================================================== */

/* Sub-Navbar Layout */
.oppe-sub-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 72px;
    z-index: 90;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0.65rem 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.oppe-sub-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Sub-Navbar Inline Controls Group */
.subnav-inline-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 0.2rem 0.5rem 0.2rem 0;
    width: 100%;
}

.subnav-inline-group::-webkit-scrollbar {
    display: none;
}

/* Segmented Control Pill Container for Levels */
.oppe-nav-tabs {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    background: var(--bg-card);
    padding: 0.2rem;
    border-radius: var(--radius-full, 9999px);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

.oppe-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.38rem 0.8rem;
    border-radius: var(--radius-full, 9999px);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.oppe-tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-subtle);
}

.oppe-tab-btn.active {
    background: var(--accent-terracotta);
    color: #FFFFFF;
    box-shadow: 0 3px 12px rgba(216, 76, 30, 0.35);
}

.subnav-divider {
    width: 1px;
    height: 22px;
    background: var(--border-color);
    margin: 0 0.1rem;
    flex-shrink: 0;
}

/* Subject Filter Pills Container */
.subnav-subjects-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.subnav-subject-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.38rem 0.78rem;
    border-radius: var(--radius-full, 9999px);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

.subnav-subject-btn i {
    font-size: 0.82rem;
    opacity: 0.85;
}

.subnav-subject-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
    background: var(--bg-surface);
    transform: translateY(-1px);
}

.subnav-subject-btn.active {
    background: var(--text-primary);
    color: var(--bg-card);
    border-color: var(--text-primary);
    box-shadow: 0 4px 14px rgba(35, 24, 21, 0.18);
}

[data-theme="dark"] .subnav-subject-btn.active {
    background: var(--accent-terracotta);
    color: #FFFFFF;
    border-color: var(--accent-terracotta);
}

/* Hero Section with Signature BSH Grid & Glow Patterns */
.oppe-hero-wrapper {
    position: relative;
    padding: 2.25rem 0 1.5rem;
    overflow: hidden;
}

.oppe-hero-bg-grid {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(216, 76, 30, 0.12) 1px, transparent 0);
    background-size: 32px 32px;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 80%);
    z-index: 0;
}

.oppe-hero-glow-blob {
    position: absolute;
    top: -40px;
    right: 15%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(216, 76, 30, 0.22) 0%, rgba(230, 85, 39, 0.06) 50%, transparent 70%);
    filter: blur(50px);
    pointer-events: none;
    z-index: 0;
    animation: oppeGlowPulse 8s ease-in-out infinite alternate;
}

@keyframes oppeGlowPulse {
    0% { transform: scale(0.9) translateY(0); opacity: 0.7; }
    100% { transform: scale(1.15) translateY(15px); opacity: 1; }
}

/* Hero 2-Column Section */
.hero-flex-layout {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-left-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* High-Visibility Hero Title & Text Highlight for Light & Dark Mode */
.oppe-hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.25;
}

.oppe-title-highlight {
    color: #E65527;
    background: linear-gradient(135deg, #FF6B35 0%, #F97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

[data-theme="dark"] .oppe-title-highlight {
    color: #FF7043 !important;
    background: linear-gradient(135deg, #FF7043 0%, #FF9E80 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    filter: drop-shadow(0 0 10px rgba(255, 112, 67, 0.5));
}

/* Sleek Neon Brand Lockup Badge (2 Logos + Small Cross + Neon Glow Effect) */
.hero-neon-brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    padding: 0.85rem 1.6rem;
    background: rgba(255, 255, 255, 0.85);
    border: 1.5px solid rgba(46, 204, 113, 0.45);
    border-radius: 20px;
    box-shadow: 0 0 25px rgba(46, 204, 113, 0.25), inset 0 0 12px rgba(46, 204, 113, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    animation: neonBadgeFloat 5s ease-in-out infinite alternate;
}

@keyframes neonBadgeFloat {
    0% { transform: translateY(0); box-shadow: 0 0 22px rgba(46, 204, 113, 0.25), inset 0 0 10px rgba(46, 204, 113, 0.1); }
    100% { transform: translateY(-5px); box-shadow: 0 0 32px rgba(46, 204, 113, 0.45), inset 0 0 16px rgba(46, 204, 113, 0.2); }
}

[data-theme="dark"] .hero-neon-brand-badge {
    background: rgba(18, 21, 30, 0.85);
    border-color: rgba(46, 204, 113, 0.6);
    box-shadow: 0 0 28px rgba(46, 204, 113, 0.35), inset 0 0 15px rgba(46, 204, 113, 0.18);
}

.hero-neon-brand-badge:hover {
    transform: translateY(-6px) scale(1.03);
    border-color: #2ecc71;
    box-shadow: 0 0 40px rgba(46, 204, 113, 0.55), inset 0 0 20px rgba(46, 204, 113, 0.25);
}

.neon-bsh-logo {
    height: 42px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
}

.neon-cross-symbol {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-muted);
    opacity: 0.75;
    user-select: none;
    line-height: 1;
}

.neon-hr-hexagon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 1.5rem;
    filter: drop-shadow(0 0 12px rgba(46, 204, 113, 0.6));
    transition: transform 0.3s ease;
}

.hero-neon-brand-badge:hover .neon-hr-hexagon {
    transform: rotate(10deg) scale(1.05);
}

/* Cards Grid Layout */
.oppe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3.5rem;
    position: relative;
    z-index: 1;
}

/* OPPE Practice Card */
.oppe-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.25rem;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    box-shadow: var(--shadow-card);
    animation: oppeFadeInUp 0.4s ease-out forwards;
}

@keyframes oppeFadeInUp {
    0% { opacity: 0; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
}

.oppe-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: var(--accent-terracotta);
    box-shadow: 0 20px 40px -10px rgba(216, 76, 30, 0.18);
}

.oppe-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.course-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.7rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.course-chip-python { background: rgba(55, 118, 171, 0.12); color: #3776AB; border: 1px solid rgba(55, 118, 171, 0.3); }
.course-chip-pdsa { background: rgba(147, 51, 234, 0.12); color: #9333EA; border: 1px solid rgba(147, 51, 234, 0.3); }
.course-chip-sys { background: rgba(234, 88, 12, 0.12); color: #EA580C; border: 1px solid rgba(234, 88, 12, 0.3); }
.course-chip-java { background: rgba(220, 38, 38, 0.12); color: #DC2626; border: 1px solid rgba(220, 38, 38, 0.3); }
.course-chip-dbms { background: rgba(16, 185, 129, 0.12); color: #10B981; border: 1px solid rgba(16, 185, 129, 0.3); }
.course-chip-ml { background: rgba(217, 70, 239, 0.12); color: #D946EF; border: 1px solid rgba(217, 70, 239, 0.3); }

.oppe-level-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    font-family: var(--font-mono);
}

.level-oppe1 { background: #E0E7FF; color: #3730A3; }
.level-oppe2 { background: #FCE7F3; color: #9D174D; }

[data-theme="dark"] .level-oppe1 { background: rgba(99, 102, 241, 0.2); color: #818CF8; }
[data-theme="dark"] .level-oppe2 { background: rgba(236, 72, 153, 0.2); color: #F472B6; }

.oppe-card-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.45rem;
    line-height: 1.35;
}

.oppe-card-body p {
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* Card Meta Details Chips */
.oppe-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--bg-surface);
    padding: 0.28rem 0.6rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-secondary);
}

.meta-chip i {
    color: var(--accent-terracotta);
}

/* Languages Supported List */
.lang-tags-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.lang-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.18rem 0.45rem;
    border-radius: 4px;
    background: var(--bg-subtle);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* Card Actions */
.oppe-card-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.btn-launch-hr {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.1rem;
    border-radius: var(--radius-md);
    background: #2ecc71;
    color: #0d381e;
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.25);
}

.btn-launch-hr:hover {
    background: #27ae60;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(46, 204, 113, 0.4);
}

.btn-preview-modal {
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-preview-modal:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

/* Interactive Subject Hub Grid (Initial Selection State) */
.subject-hub-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.25rem 1.15rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.subject-hub-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: transparent;
    transition: background 0.3s ease;
}

.subject-hub-card:hover {
    border-color: var(--accent-terracotta);
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-card);
}

.subject-hub-card:hover::before {
    background: var(--accent-terracotta);
}

.subject-hub-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--accent-terracotta);
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.subject-hub-card:hover .subject-hub-icon {
    background: var(--accent-terracotta);
    color: #FFFFFF;
    border-color: var(--accent-terracotta);
}

/* Modal Window for OPPE Details */
body:has(.oppe-modal-overlay.active) {
    overflow: hidden !important;
    touch-action: none;
}

.oppe-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(10, 12, 18, 0.75) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    z-index: 999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 1.5rem !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.oppe-modal-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
}

.oppe-modal-card {
    background: var(--bg-card) !important;
    border: 1.5px solid var(--border-color) !important;
    border-radius: var(--radius-xl) !important;
    max-width: 650px !important;
    width: 92% !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
    padding: 2rem !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35) !important;
    position: relative !important;
    margin: auto !important;
    transform: translateY(14px) scale(0.98);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.oppe-modal-overlay.active .oppe-modal-card {
    transform: translateY(0) scale(1) !important;
}

.modal-close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.modal-header-info {
    margin-bottom: 1.5rem;
    padding-right: 2rem;
}

.modal-header-info h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 0.5rem;
    line-height: 1.3;
}

.modal-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 1.25rem;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.modal-section-title i {
    color: var(--accent-terracotta);
}

.syllabus-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
}

.syllabus-list li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-surface);
    padding: 0.45rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border-light);
}

.syllabus-list li i {
    color: #10B981;
    font-size: 0.8rem;
}

.modal-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

/* Mobile & Tablet Phone Interface Responsive System */
@media (max-width: 992px) {
    .hero-flex-layout {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 1.5rem;
    }

    .hero-left-content {
        align-items: center;
        text-align: center;
        width: 100%;
    }

    .hero-badge-wrapper {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .hero-neon-brand-badge {
        align-self: center;
        margin: 0.5rem auto 0 auto;
    }
}

@media (max-width: 768px) {
    .oppe-sub-header {
        top: 60px;
        padding: 0.5rem 0;
    }

    .oppe-sub-container {
        padding: 0 0.75rem;
    }

    .subnav-inline-group {
        padding: 0.2rem 0.5rem 0.2rem 0.2rem;
    }

    .oppe-hero-wrapper {
        padding: 1.75rem 0 1.25rem;
    }

    .oppe-hero-title {
        font-size: 1.95rem;
        line-height: 1.2;
    }

    .hero-neon-brand-badge {
        padding: 0.65rem 1.25rem;
        gap: 0.65rem;
        border-radius: 16px;
    }

    .neon-bsh-logo {
        height: 34px;
    }

    .neon-hr-hexagon {
        width: 34px;
        height: 34px;
        font-size: 1.2rem;
    }

    .oppe-empty-state {
        padding: 2.25rem 1rem !important;
    }

    .oppe-empty-state h2 {
        font-size: 1.35rem !important;
    }

    .oppe-empty-state p {
        font-size: 0.88rem !important;
        margin-bottom: 1.75rem !important;
    }

    .oppe-grid {
        grid-template-columns: 1fr;
        gap: 1.1rem;
    }

    .subject-hub-card {
        padding: 1rem 0.9rem;
    }
}
