@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Inter:wght@400;600&display=swap');

:root {
    --bg-dark: #090a0f;
    --card-bg: rgba(20, 24, 34, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-hover: rgba(30, 36, 50, 0.8);
    --text-main: #f0f2f5;
    --text-muted: #9ba1a6;
    --accent: #2e8af6;
    --accent-glow: rgba(46, 138, 246, 0.4);

    --diff-easy: #4caf50;
    --diff-medium: #ff9800;
    --diff-hard: #f44336;
    --diff-insane: #9c27b0;
    --diff-nightmare: #b71c1c;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-dark);
    min-height: 100vh;
    overflow-x: hidden;
}

.bg-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: url('./assets/bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(8px) brightness(0.6);
    transform: scale(1.05);
}

.bg-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 20%, #090a0f 95%);
}

h1,
h2,
h3,
h4,
h5,
.brand {
    font-family: 'Outfit', sans-serif;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: linear-gradient(to bottom, rgba(9, 10, 15, 0.9), transparent);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: 1px;
}

.brand span {
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent-glow);
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 600;
    transition: color 0.3s;
}

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

.btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    box-shadow: 0 0 15px var(--accent-glow);
    transform: translateY(-2px);
}

.btn.outline {
    background: transparent;
    border: 1px solid var(--card-border);
}

.btn.outline:hover {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: none;
}

main {
    padding: 2rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.search-bar {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0.5rem;
    backdrop-filter: blur(12px);
}

.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    padding: 0.8rem;
    font-size: 1.1rem;
    outline: none;
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-select {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    outline: none;
    backdrop-filter: blur(12px);
    font-family: inherit;
    cursor: pointer;
}

.filter-select option {
    background: var(--bg-dark);
}

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

.strategy-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.strategy-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card-img {
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: rgba(0, 0, 0, 0.5);
    position: relative;
}

.featured-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ffc107;
    color: #000;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.card-content {
    padding: 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.card-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.badge {
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
}

.badge.Easy {
    color: var(--diff-easy);
    border: 1px solid var(--diff-easy);
}

.badge.Medium {
    color: var(--diff-medium);
    border: 1px solid var(--diff-medium);
}

.badge.Hard {
    color: var(--diff-hard);
    border: 1px solid var(--diff-hard);
}

.badge.Insane {
    color: var(--diff-insane);
    border: 1px solid var(--diff-insane);
}

.badge.Nightmare {
    color: var(--diff-nightmare);
    border: 1px solid var(--diff-nightmare);
}

.card-author {
    margin-top: auto;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.card-author span {
    color: #fff;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-dark);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    padding: 2rem;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
}

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 1rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-links {
        display: flex;
        gap: 0.5rem;
    }

    .nav-links button {
        margin-left: 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .search-bar {
        width: 100%;
        margin: 0 1rem;
    }

    .strategy-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 1.5rem;
        width: 95%;
    }
}