/* ===== BugHane Play - Global Styles ===== */
:root {
    --bg: #0a0a0f;
    --bg2: #12121a;
    --bg3: #1a1a25;
    --surface: #16161f;
    --border: #2a2a3a;
    --text: #e0e0e8;
    --text2: #8888a0;
    --accent: #00ff88;
    --accent2: #00cc6a;
    --accent-dim: rgba(0,255,136,0.1);
    --red: #ff4466;
    --orange: #ff8844;
    --yellow: #ffcc00;
    --blue: #4488ff;
    --purple: #aa66ff;
    --cyan: #00ddff;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --font: 'Inter', -apple-system, sans-serif;
    --mono: 'JetBrains Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

/* ===== Navbar ===== */
.navbar {
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}
.logo-icon { font-size: 24px; }
.accent { color: var(--accent); }
.nav-links {
    display: flex;
    gap: 4px;
}
.nav-link {
    color: var(--text2);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}
.nav-link:hover, .nav-link.active {
    color: var(--accent);
    background: var(--accent-dim);
    opacity: 1;
}
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 24px; cursor: pointer; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-primary {
    background: var(--accent);
    color: var(--bg);
}
.btn-primary:hover { background: var(--accent2); opacity: 1; color: var(--bg); }
.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}
.btn-outline:hover { background: var(--accent-dim); opacity: 1; }
.btn-ghost {
    background: var(--bg3);
    color: var(--text2);
    border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--text2); color: var(--text); opacity: 1; }
.btn-danger { background: var(--red); color: #fff; }

/* ===== User Menu ===== */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}
.user-menu:hover { background: var(--bg3); }
.user-avatar { font-size: 20px; }
.user-name { font-size: 14px; font-weight: 600; color: var(--text); }
.user-points { font-size: 13px; color: var(--accent); font-family: var(--mono); }
.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    min-width: 160px;
    box-shadow: var(--shadow);
    z-index: 200;
}
.user-menu.open .user-dropdown { display: block; }
.user-dropdown a {
    display: block;
    padding: 10px 16px;
    color: var(--text2);
    font-size: 14px;
    transition: all 0.2s;
}
.user-dropdown a:hover { background: var(--bg3); color: var(--accent); opacity: 1; }

/* ===== Main Content ===== */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    min-height: calc(100vh - 120px);
}

/* ===== Cards ===== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: border-color 0.2s, transform 0.2s;
}
.card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* ===== Grid ===== */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ===== Trick Cards ===== */
.trick-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}
.trick-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,255,136,0.1);
}
.trick-card-header {
    padding: 16px 20px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.trick-category {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    font-family: var(--mono);
    letter-spacing: 0.5px;
}
.cat-xss { background: rgba(255,68,102,0.15); color: var(--red); border: 1px solid rgba(255,68,102,0.3); }
.cat-sqli { background: rgba(255,136,68,0.15); color: var(--orange); border: 1px solid rgba(255,136,68,0.3); }
.cat-ssrf { background: rgba(170,102,255,0.15); color: var(--purple); border: 1px solid rgba(170,102,255,0.3); }
.cat-idor { background: rgba(0,221,255,0.15); color: var(--cyan); border: 1px solid rgba(0,221,255,0.3); }
.cat-lfi { background: rgba(255,204,0,0.15); color: var(--yellow); border: 1px solid rgba(255,204,0,0.3); }
.cat-rce { background: rgba(255,0,0,0.2); color: #ff3333; border: 1px solid rgba(255,0,0,0.4); }
.cat-auth_bypass { background: rgba(0,255,136,0.15); color: var(--accent); border: 1px solid rgba(0,255,136,0.3); }
.cat-info_disclosure { background: rgba(68,136,255,0.15); color: var(--blue); border: 1px solid rgba(68,136,255,0.3); }
.cat-cors { background: rgba(255,170,0,0.15); color: #ffaa00; border: 1px solid rgba(255,170,0,0.3); }
.cat-xxe { background: rgba(255,100,200,0.15); color: #ff64c8; border: 1px solid rgba(255,100,200,0.3); }
.cat-ssti { background: rgba(200,200,0,0.15); color: #cccc00; border: 1px solid rgba(200,200,0,0.3); }
.cat-redirect { background: rgba(100,200,255,0.15); color: #64c8ff; border: 1px solid rgba(100,200,255,0.3); }
.cat-misc { background: rgba(150,150,150,0.15); color: #999; border: 1px solid rgba(150,150,150,0.3); }

.trick-difficulty {
    font-size: 11px;
    font-family: var(--mono);
    padding: 2px 8px;
    border-radius: 4px;
}
.diff-kolay { color: var(--accent); }
.diff-orta { color: var(--yellow); }
.diff-zor { color: var(--orange); }
.diff-elit { color: var(--red); }

.trick-card-body { padding: 0 20px 16px; }
.trick-card-body h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
    line-height: 1.3;
}
.trick-card-body p {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trick-card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text2);
}
.trick-meta { display: flex; align-items: center; gap: 12px; }
.trick-bounty {
    color: var(--accent);
    font-family: var(--mono);
    font-weight: 600;
}

/* ===== Code Block ===== */
.code-block {
    background: #0d0d14;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
    color: var(--accent);
    white-space: pre-wrap;
    word-break: break-all;
}

/* ===== Badge ===== */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--mono);
}
.badge-daily { background: rgba(0,255,136,0.15); color: var(--accent); border: 1px solid rgba(0,255,136,0.3); }

/* ===== Stats ===== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}
.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    font-family: var(--mono);
    color: var(--accent);
}
.stat-card .stat-label {
    font-size: 13px;
    color: var(--text2);
    margin-top: 4px;
}

/* ===== Section ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.section-header h2 {
    font-size: 22px;
    font-weight: 700;
}
.section-header h2 span { color: var(--accent); }

/* ===== Filters ===== */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.filter-btn {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--mono);
    background: var(--bg3);
    color: var(--text2);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}
.filter-btn:hover, .filter-btn.active {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-dim);
}
.search-input {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
    max-width: 300px;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text2); }

/* ===== Quiz ===== */
.quiz-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    max-width: 700px;
    margin: 0 auto;
}
.quiz-question {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.5;
    white-space: pre-wrap;
}
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
    background: var(--bg3);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.quiz-option:hover { border-color: var(--accent); background: var(--accent-dim); }
.quiz-option.correct { border-color: var(--accent); background: rgba(0,255,136,0.1); }
.quiz-option.wrong { border-color: var(--red); background: rgba(255,68,102,0.1); }
.quiz-option .opt-letter {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}
.quiz-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text2);
}
.quiz-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}
.quiz-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.3s;
}
.quiz-explanation {
    background: var(--bg3);
    border-left: 3px solid var(--accent);
    padding: 16px;
    margin-top: 16px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text2);
}

/* ===== Leaderboard ===== */
.lb-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: border-color 0.2s;
}
.lb-row:hover { border-color: var(--accent); }
.lb-rank {
    font-size: 18px;
    font-weight: 700;
    font-family: var(--mono);
    width: 40px;
    text-align: center;
    color: var(--text2);
}
.lb-row:nth-child(1) .lb-rank { color: #ffd700; font-size: 22px; }
.lb-row:nth-child(2) .lb-rank { color: #c0c0c0; font-size: 20px; }
.lb-row:nth-child(3) .lb-rank { color: #cd7f32; font-size: 20px; }
.lb-avatar { font-size: 28px; }
.lb-info { flex: 1; }
.lb-name { font-weight: 600; font-size: 15px; }
.lb-streak { font-size: 12px; color: var(--text2); }
.lb-points {
    font-family: var(--mono);
    font-weight: 700;
    font-size: 18px;
    color: var(--accent);
}

/* ===== Cheatsheet ===== */
.cs-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.cs-card-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background 0.2s;
}
.cs-card-header:hover { background: var(--bg3); }
.cs-card-header h3 { font-size: 15px; font-weight: 600; }
.cs-card-body { padding: 0 20px 16px; display: none; }
.cs-card.open .cs-card-body { display: block; }
.cs-toggle { color: var(--text2); font-size: 18px; transition: transform 0.2s; }
.cs-card.open .cs-toggle { transform: rotate(180deg); }

/* ===== Modal ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    z-index: 500;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-header h2 { font-size: 18px; }
.modal-close {
    background: none;
    border: none;
    color: var(--text2);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 24px; }

/* ===== Forms ===== */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text2);
    margin-bottom: 6px;
}
.form-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--accent); }
.form-error { color: var(--red); font-size: 12px; margin-top: 4px; }

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 30px;
}
.page-btn {
    padding: 8px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text2);
    font-family: var(--mono);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.page-btn:hover, .page-btn.active { color: var(--accent); border-color: var(--accent); }

/* ===== Toast ===== */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 600;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    animation: toastIn 0.3s ease;
    box-shadow: var(--shadow);
}
.toast-success { background: rgba(0,255,136,0.15); color: var(--accent); border: 1px solid rgba(0,255,136,0.3); }
.toast-error { background: rgba(255,68,102,0.15); color: var(--red); border: 1px solid rgba(255,68,102,0.3); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ===== Footer ===== */
.footer {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 16px 0;
    font-size: 13px;
    color: var(--text2);
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.footer-sep { color: var(--border); margin: 0 8px; }

/* ===== Hero ===== */
.hero {
    text-align: center;
    padding: 50px 0 40px;
}
.hero h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.2;
}
.hero p {
    font-size: 18px;
    color: var(--text2);
    max-width: 600px;
    margin: 0 auto 30px;
}
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
}
.hero-stat .hs-value {
    font-size: 28px;
    font-weight: 700;
    font-family: var(--mono);
    color: var(--accent);
}
.hero-stat .hs-label {
    font-size: 13px;
    color: var(--text2);
}

/* ===== Daily Trick ===== */
.daily-card {
    background: linear-gradient(135deg, rgba(0,255,136,0.05) 0%, rgba(0,255,136,0.02) 100%);
    border: 1px solid rgba(0,255,136,0.2);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}
.daily-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(0,255,136,0.03) 0%, transparent 50%);
    pointer-events: none;
}
.daily-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-family: var(--mono);
}

/* ===== Copy Button ===== */
.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--text2);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    font-family: var(--mono);
    transition: all 0.2s;
}
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.code-wrapper { position: relative; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-toggle { display: block; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg2);
        border-bottom: 1px solid var(--border);
        padding: 10px;
    }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .hero h1 { font-size: 28px; }
    .hero-stats { gap: 20px; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .search-input { max-width: 100%; }
}
