/* 
 * Problem Statements Page - Standalone Stylesheet
 * HackWell'26 - AI & DS Department
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;900&family=Space+Grotesk:wght@300;400;500;600;700&family=Orbitron:wght@400;500;700&display=swap');

:root {
    /* Color Palette */
    --bg-primary: #0B0F1A;
    --bg-secondary: #111827;
    --bg-tertiary: #1F2937;

    --accent-primary: #2563EB;
    --accent-secondary: #7C3AED;
    --accent-glow: #60A5FA;

    --text-primary: #E5E7EB;
    --text-secondary: #9CA3AF;
    --text-tertiary: #6B7280;

    --glass-bg: rgba(17, 24, 39, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.04);

    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --neon-shadow: 0 0 20px rgba(37, 99, 235, 0.15), 0 0 40px rgba(124, 58, 237, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Hide scrollbar */
body::-webkit-scrollbar {
    display: none;
}

body {
    scrollbar-width: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Space Grotesk', sans-serif;
}

/* Background Effects */
@keyframes bgPulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(37, 99, 235, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(124, 58, 237, 0.12) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
    animation: bgPulse 8s ease-in-out infinite;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -2;
}

/* ==================== NAVIGATION ==================== */

nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(11, 15, 26, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
    z-index: 1002;
}

.nav-logo-img {
    height: 50px;
    width: 50px;
    border-radius: 50%;
    object-fit: cover;
    opacity: 1;
    transform: scale(1);
    transition: all 0.4s ease;
    border: 2px solid var(--accent-primary);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.3);
}

.brand-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
    transition: all 0.4s ease;
}

.brand-sep {
    color: var(--accent-primary);
}

.brand-sub {
    font-weight: 400;
    color: var(--accent-glow);
    font-size: 1.3rem;
}

/* Horizontal Nav Links */
.nav-links-horizontal {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    transition: all 0.4s ease;
}

.nav-links-horizontal a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 0.95rem;
    position: relative;
}

.nav-links-horizontal a:hover {
    color: var(--accent-primary);
}

.nav-links-horizontal a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

.nav-links-horizontal a:hover::after {
    width: 100%;
}

/* Menu Toggle - Mobile Options Button */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    padding: 10px;
    z-index: 1002;
    transition: all 0.3s ease;
}

.menu-toggle span {
    width: 30px;
    height: 3px;
    background: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Navigation Pane */
.nav-pane {
    position: fixed;
    top: 0;
    right: -100%;
    width: 350px;
    height: 100vh;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--glass-border);
    z-index: 1001;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 6rem 2rem 2rem;
    overflow-y: auto;
}

.nav-pane.active {
    right: 0;
}

.nav-pane-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2.5rem;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    line-height: 1;
}

.nav-pane-close:hover {
    color: var(--accent-primary);
    transform: rotate(90deg);
}

.nav-pane-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.nav-pane-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    display: block;
    border-bottom: 1px solid transparent;
}

.nav-pane-links a:hover {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
    padding-left: 1rem;
}

/* Backdrop */
.nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.nav-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* ==================== PROBLEM STATEMENTS SECTION ==================== */

.problems-section {
    min-height: 100vh;
    padding: 6rem 2rem 4rem;
}

.problems-container {
    max-width: 1400px;
    margin: 0 auto;
}

.problems-header {
    text-align: center;
    margin-bottom: 3rem;
}

.problems-header h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.problems-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* Filters */
.problem-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    border: 2px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.filter-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-color: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
}

/* Problem Cards Grid */
.problems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

/* Simplified Card UI */
.problem-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(11, 15, 26, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.problem-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(124, 58, 237, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.problem-card:hover::before {
    opacity: 1;
}

.problem-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.2);
}

.problem-tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    align-self: flex-start;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.problem-title {
    font-size: 1.15rem;
    margin-bottom: 0;
    color: var(--text-primary);
    line-height: 1.4;
    transition: color 0.3s ease;
}

.problem-card:hover .problem-title {
    color: var(--accent-glow);
}

/* Hide cards that don't match filter */
.problem-card.hidden {
    display: none;
}

/* ==================== DETAIL PANEL ==================== */

/* Detail Panel - Centered at 70% width */
.problem-detail-panel {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 70%;
    max-width: 1200px;
    max-height: 85vh;
    background: rgba(17, 24, 39, 0.98);
    backdrop-filter: blur(20px);
    border: 2px solid var(--accent-primary);
    border-radius: 20px 20px 0 0;
    z-index: 2000;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.5);
}

.problem-detail-panel.active {
    transform: translateX(-50%) translateY(0);
}

.panel-header {
    position: sticky;
    top: 0;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
    z-index: 10;
}

.panel-close {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-close:hover {
    color: var(--accent-primary);
    transform: rotate(90deg);
}

.panel-content {
    padding: 2rem 3rem 3rem;
}

.problem-id-badge-large {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.problem-detail-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.problem-detail-theme {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    background: rgba(37, 99, 235, 0.15);
    color: var(--accent-glow);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 2rem;
    border: 1px solid rgba(37, 99, 235, 0.3);
}

.problem-detail-section {
    background: rgba(31, 41, 55, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.problem-detail-section h3 {
    font-size: 1.3rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.problem-detail-section h3::before {
    content: '';
    width: 4px;
    height: 1.3rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 2px;
}

.problem-detail-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
}

/* Custom Scrollbar for Panel */
.problem-detail-panel::-webkit-scrollbar {
    width: 8px;
}

.problem-detail-panel::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.5);
}

.problem-detail-panel::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

.problem-detail-panel::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* Panel Backdrop */
.panel-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.panel-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* ==================== ANIMATIONS ==================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* Tablet */
@media (max-width: 1024px) {
    .nav-container {
        padding: 0 2rem;
    }

    .problems-section {
        padding: 5rem 1.5rem 3rem;
    }

    .problems-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }

    .problem-detail-panel {
        width: 85%;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1.5rem;
    }

    .nav-links-horizontal {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .brand-text {
        font-size: 1.2rem;
    }

    .brand-sub {
        font-size: 1.1rem;
    }

    .nav-logo-img {
        height: 40px;
        width: 40px;
    }

    .nav-pane {
        width: 280px;
    }

    .problems-section {
        padding: 5rem 1rem 2rem;
    }

    .problems-header h1 {
        font-size: 2rem;
    }

    .problems-header p {
        font-size: 1rem;
    }

    .problem-filters {
        gap: 0.75rem;
    }

    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .problems-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .problem-detail-panel {
        width: 95%;
        max-height: 90vh;
        transform: translateX(-50%) translateY(100%);
    }

    .problem-detail-panel.active {
        transform: translateX(-50%) translateY(0);
    }

    .panel-content {
        padding: 1.5rem 1.5rem 2rem;
    }

    .problem-detail-title {
        font-size: 1.5rem;
    }

    .problem-detail-section {
        padding: 1rem;
    }

    .problem-detail-section h3 {
        font-size: 1.1rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .problems-header h1 {
        font-size: 1.75rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .problem-card {
        padding: 1.25rem;
    }

    .problem-title {
        font-size: 1.05rem;
    }
}