/* ========== Global ========== */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f9fafb;
    color: #111827;
}

/* ========== Header ========== */
header {
    background: #111827;
    color: white;
    padding: 3rem 2rem 4rem;
    text-align: center;
    margin-bottom: 2rem;
}

/* ========== Section Cards ========== */
.section {
    max-width: 900px;
    margin: 2rem auto;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* ========== Navbar ========== */
.navbar {
    background: #111827;
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

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

.logo {
    max-height: 90px;
    width: auto;
    margin-right: 20px;
    vertical-align: middle;
}

.nav-title {
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 1.5px;
}

.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-links li {
    position: relative;
}

.nav-links li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease-in-out;
}

.nav-links li a:hover {
    color: #fbbf24;
}

/* Dropdown */
.dropdown .dropbtn {
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #1f2937;
    min-width: 180px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.3);
    border-radius: 6px;
    z-index: 1;
}

.dropdown-content a {
    color: #f9fafb;
    padding: 12px 16px;
    display: block;
    text-decoration: none;
    font-weight: 500;
    border-radius: 4px;
}

.dropdown-content a:hover {
    background: #374151;
    color: #fbbf24;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* ========== Footer ========== */
.footer {
    background: #111827;
    color: #d1d5db;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 2rem;
}

.footer p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

/* Contact Email Link */
.contact-btn {
    color: #d1d5db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease-in-out;
}

.contact-btn:hover {
    color: #fbbf24;
    text-decoration: underline;
}

/* Social Media Icons Row */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-icons a {
    color: #d1d5db;
    transition: color 0.2s ease-in-out;
}

.social-icons a:hover {
    color: #fbbf24;
}

/* ========== Main Sections ========== */
main > section {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

/* ========== IP Display ========== */
.ip-display {
    color: #aeb9c4;
    font-size: 0.85rem;
    font-family: 'Courier New', Courier, monospace;
    margin-left: auto;
    padding-left: 1.5rem;
    cursor: help;
    white-space: pre-line;
}
/* Labs Page Styles */
.labs-page { max-width: 1200px; margin: 0 auto; padding: 2rem; }
.labs-page .subtitle { text-align: center; color: #6b7280; font-size: 1.2rem; margin-top: -1rem; }
.labs-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; margin-top: 3rem; }
.lab-card { background: white; border-radius: 12px; padding: 2rem; box-shadow: 0 4px 12px rgba(0,0,0,0.1); transition: all 0.3s; cursor: pointer; border: 2px solid transparent; }
.lab-card:not(.coming-soon):hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); border-color: #3b82f6; }
.lab-card.coming-soon { opacity: 0.6; cursor: not-allowed; background: #f9fafb; }
.lab-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.lab-icon { font-size: 2.5rem; }
.lab-header h3 { margin: 0; color: #1f2937; }
.lab-description { color: #6b7280; line-height: 1.6; margin-bottom: 1.5rem; }
.lab-meta { display: flex; justify-content: space-between; margin-bottom: 1.5rem; }
.lab-difficulty { padding: 0.4rem 0.8rem; border-radius: 20px; font-size: 0.85rem; font-weight: 600; }
.lab-difficulty.easy { background: #dcfce7; color: #166534; }
.lab-difficulty.medium { background: #fef3c7; color: #92400e; }
.lab-difficulty.hard { background: #fee2e2; color: #991b1b; }
.lab-challenges { color: #6b7280; font-size: 0.9rem; }
.lab-enter-btn { width: 100%; padding: 0.75rem; background: #3b82f6; color: white; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; transition: 0.2s; }
.lab-enter-btn:hover:not(:disabled) { background: #2563eb; }
.lab-enter-btn:disabled { background: #9ca3af; cursor: not-allowed; }

/* XSS Lab Styles */
.xss-lab { max-width: 900px; margin: 0 auto; padding: 2rem; }
.lab-nav { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.back-btn { padding: 0.75rem 1.5rem; background: #6b7280; color: white; border: none; border-radius: 8px; cursor: pointer; font-weight: 600; }
.back-btn:hover { background: #4b5563; }
.lab-nav h2 { margin: 0; color: #1f2937; }
.warning-banner { background: #dc2626; color: white; padding: 1rem; border-radius: 8px; margin-bottom: 2rem; text-align: center; font-weight: 600; }
.lab-layout { display: grid; grid-template-columns: 280px 1fr; gap: 2rem; }
.lab-sidebar { background: white; border-radius: 12px; padding: 1.5rem; box-shadow: 0 4px 12px rgba(0,0,0,0.1); height: fit-content; position: sticky; top: 2rem; }
.progress { margin-bottom: 2rem; }
.progress h4 { margin: 0 0 0.75rem 0; color: #1f2937; }
.progress-bar { width: 100%; height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; margin-bottom: 0.5rem; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #10b981 0%, #059669 100%); transition: width 0.3s; }
.progress-text { font-size: 0.85rem; color: #6b7280; }
.challenges { margin-top: 1.5rem; }
.challenges h4 { margin: 0 0 0.75rem 0; color: #1f2937; }
.challenge-nav-btn { width: 100%; padding: 0.75rem; border: 2px solid #e5e7eb; background: white; border-radius: 8px; cursor: pointer; text-align: left; margin-bottom: 0.5rem; transition: all 0.2s; display: flex; align-items: center; gap: 0.75rem; }
.challenge-nav-btn:hover { border-color: #3b82f6; background: #eff6ff; }
.challenge-nav-btn.active { border-color: #3b82f6; background: #dbeafe; }
.challenge-nav-btn.completed { border-color: #10b981; background: #d1fae5; }
.challenge-number { background: #f3f4f6; padding: 0.25rem 0.6rem; border-radius: 50%; font-weight: 700; font-size: 0.85rem; }
.challenge-nav-btn.completed .challenge-number { background: #10b981; color: white; }
.challenge-name { font-weight: 600; color: #374151; font-size: 0.9rem; }
.lab-content { background: white; border-radius: 12px; padding: 2rem; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.challenge-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 2px solid #f3f4f6; }
.challenge-header h3 { margin: 0; color: #1f2937; font-size: 1.75rem; }
.difficulty-badge { padding: 0.5rem 1rem; border-radius: 20px; font-size: 0.85rem; font-weight: 700; }
.difficulty-badge.easy { background: #dcfce7; color: #166534; }
.difficulty-badge.medium { background: #fef3c7; color: #92400e; }
.difficulty-badge.hard { background: #fee2e2; color: #991b1b; }
.challenge-desc { background: #f8fafc; padding: 1.5rem; border-radius: 8px; margin-bottom: 2rem; border-left: 4px solid #3b82f6; }
.challenge-desc h4 { color: #1e40af; margin: 0 0 0.5rem 0; font-size: 1.1rem; }
.challenge-desc ul { margin-left: 1.5rem; margin-top: 0.5rem; }
.challenge-desc li { margin-bottom: 0.5rem; }
.vulnerable-info { background: #eff6ff; padding: 1rem; border-radius: 6px; border-left: 4px solid #3b82f6; margin-top: 1rem; }
.vulnerable-zone { background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%); border: 2px solid #f59e0b; border-radius: 12px; padding: 2rem; margin: 2rem 0; position: relative; }
.vulnerable-zone::before { content: '⚠️ VULNERABLE'; position: absolute; top: -12px; left: 20px; background: #f59e0b; color: white; padding: 0.25rem 0.75rem; font-size: 0.75rem; font-weight: 700; border-radius: 4px; }
.vulnerable-zone h4 { color: #92400e; margin: 0 0 0.5rem 0; }
.api-info { background: #1f2937; color: #f9fafb; padding: 0.5rem 1rem; border-radius: 6px; font-family: monospace; font-size: 0.9rem; margin: 1rem 0; }
.input-area { margin: 1.5rem 0; }
.input-area label { display: block; font-weight: 600; color: #374151; margin-bottom: 0.5rem; }
.payload-input { width: 100%; padding: 1rem; border: 2px solid #d1d5db; border-radius: 8px; font-family: monospace; font-size: 0.95rem; min-height: 100px; resize: vertical; }
.payload-input:focus { outline: none; border-color: #3b82f6; }
.submit-payload-btn { margin-top: 1rem; padding: 0.875rem 1.5rem; background: #3b82f6; color: white; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; }
.submit-payload-btn:hover:not(:disabled) { background: #2563eb; }
.submit-payload-btn:disabled { background: #9ca3af; cursor: not-allowed; }
.output-area { margin-top: 2rem; padding-top: 1.5rem; border-top: 2px solid rgba(0,0,0,0.1); }
.output-area h4 { color: #374151; margin: 0 0 1rem 0; }
.response-display { background: white; padding: 1.5rem; border: 2px solid #e5e7eb; border-radius: 8px; min-height: 100px; }
.response-box { background: #f9fafb; padding: 1rem; border-radius: 8px; border: 2px dashed #e5e7eb; }
.response-box h4 { margin: 0 0 1rem 0; color: #1f2937; }
.response-data p { margin: 0.5rem 0; color: #374151; }
.error { background: #fee2e2; color: #991b1b; padding: 1rem; border-radius: 6px; border-left: 4px solid #dc2626; }
.solution { margin-top: 2rem; padding-top: 2rem; border-top: 2px solid #f3f4f6; }
.solution-btn { background: #10b981; color: white; padding: 1rem 1.5rem; border-radius: 8px; font-weight: 600; cursor: pointer; width: 100%; text-align: left; border: none; font-size: 1rem; }
.solution-btn:hover { background: #059669; }
.solution-content { background: #f0fdf4; padding: 1.5rem; border-radius: 8px; margin-top: 1rem; border-left: 4px solid #10b981; }
.solution-content h4 { color: #166534; margin: 0 0 0.75rem 0; }
.payload-code { display: block; background: #1f2937; color: #f9fafb; padding: 0.75rem 1rem; border-radius: 6px; font-family: monospace; font-size: 0.85rem; margin: 0.5rem 0; border-left: 3px solid #10b981; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.nav-links a.active { color: #fbbf24; font-weight: 600; }

@media (max-width: 900px) {
    .lab-layout { grid-template-columns: 1fr; }
    .lab-sidebar { position: static; }
}