:root {
    --bg: #0a0b10;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent: #7c4dff;
    --accent-glow: rgba(124, 77, 255, 0.4);
    --text: #e0e0e0;
    --text-dim: #a0a0a0;
    --success: #00e676;
    --font-main: 'Outfit', sans-serif;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Gradients */
body::before {
    content: '';
    position: fixed;
    top: -10%;
    left: -10%;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    z-index: -1;
    filter: blur(80px);
}

header {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    background: linear-gradient(to bottom, rgba(10, 11, 16, 0.6), var(--bg)), url('https://images.unsplash.com/photo-1677442136019-21780ecad995?q=80&w=2000&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
}

.hero-title {
    font-size: 5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    letter-spacing: -2px;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-dim);
    max-width: 600px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px 100px 20px;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-bar select {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 8px 16px;
    border-radius: 10px;
    outline: none;
    font-family: var(--font-main);
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.3s;
}

.filter-bar select:hover {
    border-color: var(--accent);
}

.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.task-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.task-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    transform: translateX(-100%);
    transition: 0.6s;
}

.task-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.task-card:hover::after {
    transform: translateX(100%);
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.badge-low { background: rgba(0, 230, 118, 0.1); color: var(--success); }
.badge-mid { background: rgba(255, 171, 0, 0.1); color: #ffab00; }
.badge-high { background: rgba(255, 23, 68, 0.1); color: #ff1744; }

.task-title {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: #fff;
}

.task-desc {
    color: var(--text-dim);
    font-size: 0.95rem;
    flex-grow: 1;
    margin-bottom: 25px;
}

.btn-open {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    width: 100%;
}

.btn-open:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* Detailed View (Modal logic) */
.task-detail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(20px);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: 0.4s;
}

.detail-content {
    background: var(--bg);
    border: 1px solid var(--glass-border);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 32px;
    padding: 50px;
    overflow-y: auto;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-dim);
}

.solution-box {
    background: #050505;
    border-radius: 16px;
    padding: 25px;
    margin-top: 30px;
    border: 1px solid #222;
    position: relative;
}

.solution-box pre {
    color: #8be9fd;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
}

.explanation-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #222;
}

.explanation-section h3 {
    color: var(--accent);
    margin-bottom: 15px;
}

.explanation-text {
    color: var(--text-dim);
    font-size: 1.1rem;
   font-weight: 300;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #444; }

@media (max-width: 768px) {
    .hero-title { font-size: 3rem; }
    .detail-content { padding: 30px; }
}
