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

body {
    font-family: 'Cairo', sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    overflow-x: hidden;
    line-height: 1.6;
}

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

/* Matrix Rain Background */
.matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background: linear-gradient(180deg, #000000 0%, #1a0000 100%);
}

.matrix-rain::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 0, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 0, 0, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 0, 0, 0.08) 0%, transparent 50%);
    animation: matrixGlow 4s ease-in-out infinite alternate;
}

@keyframes matrixGlow {
    0% { opacity: 0.3; }
    100% { opacity: 0.7; }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 0, 0, 0.2);
    z-index: 1000;
    padding: 1rem 0;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ninja-logo {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.5));
    animation: ninjaGlow 2s ease-in-out infinite alternate;
}

@keyframes ninjaGlow {
    0% { filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.5)); }
    100% { filter: drop-shadow(0 0 20px rgba(255, 0, 0, 0.8)); }
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff0000;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #ff0000;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff0000, #ff4444);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #ff0000;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 100px 20px 50px;
    position: relative;
}

.hero-ninja {
    margin-bottom: 2rem;
}

.ninja-container {
    position: relative;
    display: inline-block;
}

.ninja-icon {
    font-size: 6rem;
    position: relative;
    z-index: 2;
    animation: float 3s ease-in-out infinite;
}

.ninja-shadow {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 20px;
    background: radial-gradient(ellipse, rgba(0, 0, 0, 0.5) 0%, transparent 70%);
    animation: shadowPulse 3s ease-in-out infinite;
}

.ninja-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 0, 0, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: glowPulse 2s ease-in-out infinite alternate;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes shadowPulse {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.5; }
    50% { transform: translateX(-50%) scale(1.2); opacity: 0.3; }
}

@keyframes glowPulse {
    0% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.2); }
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ff0000, #ff4444, #ff0000);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: #ff0000;
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: #00ffff;
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 14%, 15%, 49%, 50%, 99%, 100% { transform: translate(0); }
    15%, 49% { transform: translate(-2px, -2px); }
}

@keyframes glitch-2 {
    0%, 20%, 21%, 62%, 63%, 99%, 100% { transform: translate(0); }
    21%, 62% { transform: translate(2px, 2px); }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #cccccc;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.1rem;
    color: #999999;
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(45deg, #ff0000, #cc0000);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #ff0000;
    border: 2px solid #ff0000;
}

.btn-secondary:hover {
    background: #ff0000;
    color: white;
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ff0000;
    display: block;
}

.stat-label {
    font-size: 1rem;
    color: #cccccc;
    margin-top: 0.5rem;
}

/* Page Header */
.page-header {
    padding: 120px 0 60px;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.1) 0%, transparent 50%);
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    color: #ff0000;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

.page-subtitle {
    font-size: 1.2rem;
    color: #cccccc;
}

/* Features Section */
.features {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #ffffff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 0, 0, 0.2);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 0, 0, 0.5);
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.3));
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #ff0000;
}

.feature-card p {
    color: #cccccc;
    line-height: 1.6;
}

/* Challenges Section */
.recent-challenges,
.challenges-section {
    padding: 80px 0;
}

.challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.challenge-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(10px);
}

.challenge-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 0, 0, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.challenge-difficulty {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.challenge-difficulty.very-easy {
    background: #4ade80;
    color: #000;
}

.challenge-difficulty.easy {
    background: #22c55e;
    color: #000;
}

.challenge-difficulty.medium {
    background: #f59e0b;
    color: #000;
}

.challenge-difficulty.hard {
    background: #ef4444;
    color: #fff;
}

.challenge-category {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.challenge-category.crypto {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.challenge-category.web {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.challenge-category.machine {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.challenge-category.forensic {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.challenge-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.challenge-card p {
    color: #cccccc;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.challenge-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #999999;
}

/* Filters */
.filters {
    padding: 2rem 0;
    background: rgba(255, 255, 255, 0.02);
}

.filter-tabs,
.difficulty-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.filter-btn,
.difficulty-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #cccccc;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.difficulty-btn:hover,
.filter-btn.active,
.difficulty-btn.active {
    background: #ff0000;
    border-color: #ff0000;
    color: white;
}

/* Leaderboard */
.podium-section {
    padding: 60px 0;
}

.podium {
    display: flex;
    justify-content: center;
    align-items: end;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.podium-place {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.podium-place.first {
    order: 2;
    transform: scale(1.1);
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.podium-place.second {
    order: 1;
    border-color: rgba(192, 192, 192, 0.5);
}

.podium-place.third {
    order: 3;
    border-color: rgba(205, 127, 50, 0.5);
}

.podium-crown {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    animation: crownFloat 2s ease-in-out infinite;
}

@keyframes crownFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.podium-rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff0000;
    margin-bottom: 1rem;
}

.podium-avatar {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.podium-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.country-flag {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.podium-points {
    font-size: 1rem;
    color: #ff0000;
    font-weight: 600;
}

/* Leaderboard Table */
.leaderboard-section {
    padding: 60px 0;
}

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

.leaderboard-table {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.table-header {
    display: grid;
    grid-template-columns: 80px 1fr 120px 100px 120px;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 0, 0, 0.1);
    font-weight: 600;
    color: #ff0000;
}

.table-row {
    display: grid;
    grid-template-columns: 80px 1fr 120px 100px 120px;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.table-row:hover {
    background: rgba(255, 0, 0, 0.05);
}

.rank-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}

.rank-number.gold {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #000;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.rank-number.silver {
    background: linear-gradient(45deg, #c0c0c0, #e5e5e5);
    color: #000;
}

.rank-number.bronze {
    background: linear-gradient(45deg, #cd7f32, #daa520);
    color: #000;
}

.player-col {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-avatar {
    font-size: 2rem;
}

.player-name {
    font-weight: 600;
    color: #ffffff;
}

.player-title {
    font-size: 0.9rem;
    color: #999999;
}

.country-col {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.points-col,
.solved-col {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #ff0000;
}

/* Profile */
.profile-header {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.1) 0%, transparent 50%);
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.profile-avatar {
    position: relative;
}

.avatar-container {
    position: relative;
    width: 120px;
    height: 120px;
}

.avatar-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(255, 0, 0, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: avatarGlow 2s ease-in-out infinite alternate;
}

.avatar-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    z-index: 2;
}

@keyframes avatarGlow {
    0% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

.profile-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ff0000;
    margin-bottom: 0.5rem;
}

.profile-title {
    font-size: 1.2rem;
    color: #cccccc;
    margin-bottom: 1rem;
}

.profile-country {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.rank-badge {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #000;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

/* Profile Stats */
.profile-stats {
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 0, 0, 0.2);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 0, 0, 0.4);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #ff0000;
    margin-bottom: 0.5rem;
}

.stat-card .stat-label {
    color: #cccccc;
}

/* Progress Section */
.progress-section {
    padding: 60px 0;
}

.progress-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.progress-card,
.activity-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.progress-card h3,
.activity-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #ff0000;
}

.progress-item {
    margin-bottom: 1.5rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.category-name {
    font-weight: 600;
    color: #ffffff;
}

.progress-percentage {
    font-weight: 600;
    color: #ff0000;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff0000, #ff4444);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-details {
    font-size: 0.9rem;
    color: #999999;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.activity-icon.solved {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.activity-icon.attempted {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.activity-details {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.2rem;
}

.activity-time {
    font-size: 0.9rem;
    color: #999999;
}

.activity-points {
    font-weight: 600;
    color: #ff0000;
}

/* Achievements */
.achievements-section {
    padding: 60px 0;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.achievement-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    opacity: 0.5;
}

.achievement-card.earned {
    opacity: 1;
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.1);
}

.achievement-card:hover {
    transform: translateY(-5px);
}

.achievement-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.achievement-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.achievement-description {
    color: #cccccc;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.8);
    border-top: 1px solid rgba(255, 0, 0, 0.2);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #ff0000;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .features-grid,
    .challenges-grid {
        grid-template-columns: 1fr;
    }
    
    .podium {
        flex-direction: column;
        align-items: center;
    }
    
    .podium-place.first {
        order: 1;
        transform: none;
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 60px 1fr 80px 80px 100px;
        font-size: 0.9rem;
    }
    
    .profile-info {
        flex-direction: column;
        text-align: center;
    }
    
    .progress-grid {
        grid-template-columns: 1fr;
    }
    
    .page-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .ninja-icon {
        font-size: 4rem;
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 50px 1fr 60px 60px 80px;
        font-size: 0.8rem;
        padding: 0.8rem;
    }
    
    .challenge-card {
        padding: 1rem;
    }
    
    .filter-tabs,
    .difficulty-filters {
        gap: 0.5rem;
    }
    
    .filter-btn,
    .difficulty-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}
/* ===== Flag submission form styling ===== */
.flag-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.flag-box label {
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.flag-box input[type="text"] {
    padding: 10px 14px;
    border: 2px solid #444;
    border-radius: 6px;
    font-size: 15px;
    width: 100%;
    background: #111;
    color: #f0f0f0;
    transition: border-color 0.3s ease;
}

.flag-box input[type="text"]:focus {
    outline: none;
    border-color: #ff0000;
}

.flag-box button {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    background: #ff0000;
    color: #fff;
    transition: background 0.3s ease;
    margin-top: 4px;
}

.flag-box button:hover {
    background: #cc0000;
}

/* ===== Difficulty badge fix ===== */
.challenge-card {
    position: relative;
}

.challenge-card .challenge-difficulty {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: #f39c12;
    z-index: 2;
}

.challenge-card .challenge-category {
    margin-top: 40px; /* push category below badge */
}
.flag-row { display:flex; gap:10px; align-items:center; }
.flag-row .flag-input { flex:1; }
.flag-row .flag-submit { white-space:nowrap; }

.challenge-link {
  display:inline-block; margin-top:8px;
  text-decoration:none; font-weight:600; color:#8ab4ff;
}
.challenge-link:hover { text-decoration: underline; }