/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    display: flex;
    flex-direction: column;
}

body {
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: repeating-linear-gradient(
        135deg,
        #0F0F23 0vh,
        #1A1A2E 200vh,
        #0F0F23 400vh
    );
    background-repeat: repeat;
    background-size: auto;
    color: #ffffff;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: #FFD700;
    font-weight: 600;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }
h5 { font-size: 1.125rem; font-weight: 600; }
h6 { font-size: 1rem; font-weight: 600; }

p {
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

a {
    color: #FFD700;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #FF8C00;
}

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

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: #FFD700;
    background: rgba(255, 215, 0, 0.1);
}

.nav-link.admin-link {
    color: #FF8C00;
    border: 1px solid rgba(255, 140, 0, 0.3);
}

.nav-link.admin-link:hover {
    background: rgba(255, 140, 0, 0.1);
}

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

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #FFD700;
    margin: 3px 0;
    transition: 0.3s;
}

/* Main Content */
.main-content {
    margin-top: 70px;
    flex: 1;
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 70px;
    right: 0;
    z-index: 1000;
    padding: 1rem;
}

.flash-message {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
    max-width: 400px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideInRight 0.3s ease-out;
}

.flash-message.flash-success {
    border-color: rgba(74, 222, 128, 0.5);
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
}

.flash-message.flash-error {
    border-color: rgba(248, 113, 113, 0.5);
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
}

.flash-message.flash-info {
    border-color: rgba(96, 165, 250, 0.5);
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
}

.flash-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(45deg, #FFD700, #FF8C00);
    color: #0F0F23;
    border-color: transparent;
    position: relative;
    overflow: hidden;
}
.btn-primary:hover {
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.3), inset 0 2px 6px rgba(255, 255, 255, 0.2);
    background: linear-gradient(45deg, #FFD700, #FF8C00);
    filter: brightness(1.1) saturate(1.1);
    color: #0F0F23;
}

.btn-secondary {
    background: rgba(255, 215, 0, 0.1);
    color: #FFD700;
    border-color: rgba(255, 215, 0, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.5);
    color: #FFD700;
}

.btn-outline {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 15px 35px rgba(255, 215, 0, 0.2);
}

.card-title {
    color: #FFD700;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-content {
    color: rgba(255, 255, 255, 0.8);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-published {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.badge-draft {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

/* Category badges */
.category-web { background: rgba(96, 165, 250, 0.2); color: #60a5fa; }
.category-crypto { background: rgba(192, 132, 252, 0.2); color: #c084fc; }
.category-pwn { background: rgba(248, 113, 113, 0.2); color: #f87171; }
.category-reverse { background: rgba(74, 222, 128, 0.2); color: #4ade80; }
.category-forensics { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
.category-misc { background: rgba(156, 163, 175, 0.2); color: #9ca3af; }
.category-osint { background: rgba(236, 72, 153, 0.2); color: #ec4899; }

/* Difficulty badges */
.difficulty-easy { background: rgba(74, 222, 128, 0.2); color: #4ade80; }
.difficulty-medium { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
.difficulty-hard { background: rgba(248, 113, 113, 0.2); color: #f87171; }

/* Tables */

/* Section Styling */
.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    background: linear-gradient(45deg, #FFD700, #FF8C00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-cta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
}

/* Footer */
.footer {
    background: rgba(15, 15, 35, 0.5);
    border-top: 1px solid rgba(255, 215, 0, 0.1);
    padding: 1rem 0;
    text-align: center;
}

.footer p {
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
    font-size: 0.75rem;
}

/* Animations */
@keyframes pulse-glow {
    0% { 
        background-position: 0% 50%;
        box-shadow: 0 0 30px rgba(255, 140, 0, 0.8), 0 0 60px rgba(255, 215, 0, 0.4), inset 0 2px 8px rgba(255, 255, 255, 0.3);
    }
    100% { 
        background-position: 100% 50%;
        box-shadow: 0 0 40px rgba(255, 215, 0, 1), 0 0 80px rgba(255, 140, 0, 0.6), inset 0 2px 12px rgba(255, 255, 255, 0.4);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(15, 15, 35, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 2rem 0;
        transition: left 0.3s ease;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
        position: absolute;
        right: 2rem;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6.3px, 6.3px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6.3px, -6.3px);
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    .section-title { font-size: 2rem; }
    
    .section-cta {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .nav-container {
        padding: 0 0.5rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .card {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .section-cta {
        flex-direction: column;
        align-items: center;
    }
}