/* Base styles */
:root {
    --primary-color: #202020;
    --secondary-color: #9966cc;
    --text-color: #ffffff;
    --link-color: #9966cc;
    --header-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --body-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--primary-color);
    color: var(--text-color);
    font-family: var(--body-font);
    font-size: 16px;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--header-font);
    margin: 1.5rem 0 1rem;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }

p { margin-bottom: 1rem; }

/* Links */
a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    text-decoration: underline;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.main-wrapper {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    margin: 2rem auto;
    max-width: 1400px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.content-section {
    background: rgba(43, 43, 43, 0.5);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(153, 102, 204, 0.2);
}

.content-section h2 {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Navigation */
.nav-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
    background: var(--secondary-color);
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: white;
    margin: 5px 0;
    transition: transform 0.3s ease;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 250px;
    background: #2b2b2b;
    padding: 2rem 0;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-color);
    border-left: 3px solid transparent;
}

.sidebar a:hover,
.sidebar a.active {
    background: rgba(153, 102, 204, 0.1);
    border-left-color: var(--secondary-color);
}

/* Submenu styles */
.sidebar .submenu {
    display: none;
    margin-left: 20px;
}

.sidebar .submenu.active {
    display: block;
}

.sidebar .submenu a {
    color: var(--submenu-text);
    font-size: 0.95em;
}

.sidebar .submenu a:hover {
    color: var(--sidebar-text);
    background: rgba(153, 102, 204, 0.2);
}

.sidebar .menu-item {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    color: var(--sidebar-text);
    border-left: 3px solid transparent;
}

.sidebar .menu-item:hover {
    background: rgba(153, 102, 204, 0.1);
    border-left-color: var(--secondary-color);
}

.sidebar .menu-item::after {
    content: '';
    width: 16px;
    height: 16px;
    background-image: url('icons8-ak-47-48.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.3s ease;
    display: inline-block;
}

.sidebar .menu-item.active::after {
    transform: rotate(90deg);
}

.content {
    margin-left: 250px;
    padding: 2rem;
}

/* Banner */
.banner {
    background-image: url('image (2).jpg');
    background-size: 50% auto;
    background-position: center center;
    background-repeat: no-repeat;
    padding: 6rem 2rem;
    text-align: center;
    margin: 0 auto 2rem;
    max-width: 1200px;
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

/* Add blurred background extension only for edges */
.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('image (2).jpg');
    background-size: cover;
    background-position: center center;
    filter: blur(15px);
    opacity: 0.3;
    z-index: -1;
}

.banner div {
    background: rgba(43, 43, 43, 0.5);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(153, 102, 204, 0.2);
    color: #ffffff;
}

/* Ensure banner text is always white regardless of theme */
.banner div h1,
.banner div h2 {
    color: #ffffff !important;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border: 1px solid #444;
}

th {
    background: var(--secondary-color);
}

/* Code blocks */
pre {
    background: #2b2b2b;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1rem 0;
}

code {
    font-family: 'Consolas', 'Monaco', monospace;
    background: #2b2b2b;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem 0;
}

/* Floating Ad */
.floating-ad {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 6px;
    padding: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: inline-block;
    border: 1px solid var(--secondary-color);
}

.floating-ad:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.floating-ad img {
    width: 75px;
    height: auto;
    margin: 0;
    display: block;
}

/* To Top Button */
.to-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    background: var(--secondary-color);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.to-top-btn:hover {
    background: #b377e6;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.to-top-btn img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
    margin: 0;
}

/* Footer */
.footer {
    background: var(--sidebar-bg);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    border-top: 3px solid var(--secondary-color);
}

.footer .row {
    margin: 1rem 0;
    color: var(--sidebar-text);
}

.footer ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.footer a {
    color: var(--sidebar-text);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: var(--sidebar-text);
    opacity: 1;
    transform: translateY(-2px);
}

/* Dark/Light mode toggle */
.mode-toggle {
    margin: 1rem 0;
}

.mode-toggle button {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 0.5rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .content {
        margin-left: 0;
        padding: 1rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    .footer ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer ul li {
        margin: 0;
    }
}

/* Print styles */
@media print {
    .sidebar, .nav-toggle, .mode-toggle {
        display: none;
    }

    .content {
        margin: 0;
        padding: 0;
    }

    body {
        background: white;
        color: black;
    }
}

/* Theme modes */
.dark-mode {
    --primary-color: #202020;
    --text-color: #ffffff;
    --section-bg: rgba(43, 43, 43, 0.5);
    --wrapper-bg: rgba(0, 0, 0, 0.2);
    --sidebar-bg: #2b2b2b;
    --sidebar-text: #ffffff;
    --submenu-text: #b19cd9;
    --code-bg: #2b2b2b;
}

.light-mode {
    --primary-color: #ffffff;
    --text-color: #202020;
    --section-bg: rgba(255, 255, 255, 0.9);
    --wrapper-bg: rgba(153, 102, 204, 0.1);
    --sidebar-bg: #2e0557;
    --sidebar-text: #ffffff;
    --submenu-text: #d4c4ff;
    --code-bg: #2b2b2b;
}

/* Update component colors based on theme */
.main-wrapper {
    background: var(--wrapper-bg);
}

.content-section {
    background: var(--section-bg);
}

.sidebar {
    background: var(--sidebar-bg);
}

.sidebar a {
    color: var(--sidebar-text);
}

pre, code {
    background: var(--code-bg);
    color: #ffffff;
}

/* Ensure menu items are visible in both modes */
.sidebar .menu-item {
    color: var(--sidebar-text) !important;
}

.light-mode .sidebar .menu-item {
    color: #ffffff !important;
}

.dark-mode .sidebar .menu-item {
    color: #ffffff !important;
}

/* Security Tips link styling - distinct color to indicate separate page */
.sidebar .security-tips-link {
    background: linear-gradient(135deg, #b377e6, #9b5cc7);
    color: #ffffff !important;
    font-weight: 600;
    border-radius: 8px;
    margin: 8px 12px;
    border-left: 3px solid #b377e6 !important;
    box-shadow: 0 2px 8px rgba(179, 119, 230, 0.3);
    transition: all 0.3s ease;
}

.sidebar .security-tips-link:hover {
    background: linear-gradient(135deg, #9b5cc7, #834ba8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(179, 119, 230, 0.4);
    border-left-color: #b377e6 !important;
}

/* Light mode Security Tips styling */
.light-mode .sidebar .security-tips-link {
    background: linear-gradient(135deg, #b377e6, #9b5cc7);
    border-left-color: #b377e6 !important;
    box-shadow: 0 2px 8px rgba(179, 119, 230, 0.3);
}

.light-mode .sidebar .security-tips-link:hover {
    background: linear-gradient(135deg, #9b5cc7, #834ba8);
    box-shadow: 0 4px 12px rgba(179, 119, 230, 0.4);
    border-left-color: #b377e6 !important;
}

/* Dark mode Security Tips styling */
.dark-mode .sidebar .security-tips-link {
    background: linear-gradient(135deg, #b377e6, #9b5cc7);
    border-left-color: #b377e6 !important;
    box-shadow: 0 2px 8px rgba(179, 119, 230, 0.3);
}

.dark-mode .sidebar .security-tips-link:hover {
    background: linear-gradient(135deg, #9b5cc7, #834ba8);
    box-shadow: 0 4px 12px rgba(179, 119, 230, 0.4);
    border-left-color: #b377e6 !important;
}

/* Menu Expand/Collapse Button - matches menu item styling */
.sidebar .menu-expand-btn {
    background: linear-gradient(135deg, #e08900, #cc7a00); /* AWPtimizr orange */
    color: #ffffff !important;
    font-weight: 600;
    border-radius: 8px;
    margin: 8px 12px;
    border-left: 3px solid #e08900 !important;
    box-shadow: 0 2px 8px rgba(224, 137, 0, 0.3);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: block;
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
    text-decoration: none;
    width: calc(100% - 24px);
}

.sidebar .menu-expand-btn:hover {
    background: linear-gradient(135deg, #ff9500, #e08900);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(224, 137, 0, 0.4);
    border-left-color: #e08900 !important;
    color: #ffffff !important;
}

.sidebar .menu-expand-btn.collapse-mode {
    background: linear-gradient(135deg, #05addc, #0396c7); /* AWPtimizr blue */
    border-left-color: #05addc !important;
    box-shadow: 0 2px 8px rgba(5, 173, 220, 0.3);
}

.sidebar .menu-expand-btn.collapse-mode:hover {
    background: linear-gradient(135deg, #06c4f0, #05addc);
    box-shadow: 0 4px 12px rgba(5, 173, 220, 0.4);
    border-left-color: #05addc !important;
}

/* Light mode Menu Expand Button styling */
.light-mode .sidebar .menu-expand-btn {
    background: linear-gradient(135deg, #e08900, #cc7a00);
    border-left-color: #e08900 !important;
    box-shadow: 0 2px 8px rgba(224, 137, 0, 0.3);
}

.light-mode .sidebar .menu-expand-btn:hover {
    background: linear-gradient(135deg, #ff9500, #e08900);
    box-shadow: 0 4px 12px rgba(224, 137, 0, 0.4);
    border-left-color: #e08900 !important;
}

.light-mode .sidebar .menu-expand-btn.collapse-mode {
    background: linear-gradient(135deg, #05addc, #0396c7);
    border-left-color: #05addc !important;
    box-shadow: 0 2px 8px rgba(5, 173, 220, 0.3);
}

.light-mode .sidebar .menu-expand-btn.collapse-mode:hover {
    background: linear-gradient(135deg, #06c4f0, #05addc);
    box-shadow: 0 4px 12px rgba(5, 173, 220, 0.4);
    border-left-color: #05addc !important;
}

/* Dark mode Menu Expand Button styling */
.dark-mode .sidebar .menu-expand-btn {
    background: linear-gradient(135deg, #e08900, #cc7a00);
    border-left-color: #e08900 !important;
    box-shadow: 0 2px 8px rgba(224, 137, 0, 0.3);
}

.dark-mode .sidebar .menu-expand-btn:hover {
    background: linear-gradient(135deg, #ff9500, #e08900);
    box-shadow: 0 4px 12px rgba(224, 137, 0, 0.4);
    border-left-color: #e08900 !important;
}

.dark-mode .sidebar .menu-expand-btn.collapse-mode {
    background: linear-gradient(135deg, #05addc, #0396c7);
    border-left-color: #05addc !important;
    box-shadow: 0 2px 8px rgba(5, 173, 220, 0.3);
}

.dark-mode .sidebar .menu-expand-btn.collapse-mode:hover {
    background: linear-gradient(135deg, #06c4f0, #05addc);
    box-shadow: 0 4px 12px rgba(5, 173, 220, 0.4);
    border-left-color: #05addc !important;
}

/* AWPtimizr link styling - dark background like floating ad with colorized text */
.sidebar .awptimizr-link {
    background: rgba(0, 0, 0, 0.8) !important;
    color: #ffffff !important;
    font-weight: 600;
    border-radius: 8px;
    margin: 8px 12px;
    border-left: 3px solid rgba(0, 0, 0, 0.9) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.sidebar .awptimizr-link:hover {
    background: rgba(0, 0, 0, 0.9) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border-left-color: rgba(0, 0, 0, 1) !important;
}

/* AWP text - blue color */
.sidebar .awptimizr-link .awp-text {
    color: #05addc !important;
    font-weight: 700;
}

/* timizr text - orange color */
.sidebar .awptimizr-link .timizr-text {
    color: #e67e22 !important;
    font-weight: 700;
}

/* BETA text - red color like Security Tips */
.sidebar .awptimizr-link .beta-text {
    color: #e74c3c !important;
    font-weight: 500;
    font-size: 0.9em;
}

/* Light mode AWPtimizr styling - same colors */
.light-mode .sidebar .awptimizr-link {
    background: rgba(0, 0, 0, 0.8) !important;
    border-left-color: rgba(0, 0, 0, 0.9) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.light-mode .sidebar .awptimizr-link:hover {
    background: rgba(0, 0, 0, 0.9) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border-left-color: rgba(0, 0, 0, 1) !important;
}

.light-mode .sidebar .awptimizr-link .awp-text {
    color: #05addc !important;
}

.light-mode .sidebar .awptimizr-link .timizr-text {
    color: #e67e22 !important;
}

.light-mode .sidebar .awptimizr-link .beta-text {
    color: #e74c3c !important;
}

/* Dark mode AWPtimizr styling - same colors */
.dark-mode .sidebar .awptimizr-link {
    background: rgba(0, 0, 0, 0.8) !important;
    border-left-color: rgba(0, 0, 0, 0.9) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.dark-mode .sidebar .awptimizr-link:hover {
    background: rgba(0, 0, 0, 0.9) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border-left-color: rgba(0, 0, 0, 1) !important;
}

.dark-mode .sidebar .awptimizr-link .awp-text {
    color: #05addc !important;
}

.dark-mode .sidebar .awptimizr-link .timizr-text {
    color: #e67e22 !important;
}

.dark-mode .sidebar .awptimizr-link .beta-text {
    color: #e74c3c !important;
}
