/* CSS Variables */
:root {
    --primary: #3b82f6;
    --bg: #0f172a;
    --sidebar: #0b1120;
    --card: #1e293b;
    --text: #f1f5f9;
    --accent: #10b981;
    --red: #ef4444;
}

/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar Navigation */
nav {
    width: 250px;
    background: var(--sidebar);
    padding: 25px;
    border-right: 1px solid #334155;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
}

nav h2 {
    color: var(--primary);
    margin-bottom: 5px;
    font-size: 1.3rem;
    letter-spacing: 1px;
}

nav .nav-header {
    color: #475569;
    font-size: 0.7rem;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-weight: bold;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    background: #1e293b;
    padding: 5px;
    border-radius: 8px;
}

.lang-btn {
    flex: 1;
    padding: 8px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 6px;
    transition: 0.2s;
    font-size: 0.85rem;
}

.lang-btn:hover {
    color: white;
}

.lang-btn.active {
    background: var(--primary);
    color: white;
}

/* Menu item */
.menu-item {
    margin-bottom: 10px;
}

.nav-item {
    color: #94a3b8;
    text-decoration: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.nav-item:hover {
    background: #1e293b;
    color: white;
}

.nav-item.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Submenu */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 15px;
}

.submenu.expanded {
    max-height: 1000px;
}

.submenu .nav-item {
    padding: 10px 12px;
    font-size: 0.85rem;
}

/* Arrow indicator */
.menu-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.menu-arrow.rotated {
    transform: rotate(90deg);
}

nav .footer {
    margin-top: auto;
    font-size: 0.75rem;
    color: #475569;
}

/* Content Area - CENTERED */
main {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    display: flex;
    justify-content: center;
}

.content-container {
    width: 100%;
    max-width: 1200px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

/* Language content */
.lang-content {
    display: none;
}

.lang-content.active {
    display: block;
}

/* UI Elements */
.card {
    background: var(--card);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #334155;
    margin-bottom: 25px;
}

h1 {
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 25px;
    color: var(--primary);
}

h3 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* Code block with copy button */
.code-wrapper {
    position: relative;
    margin: 15px 0;
}

code {
    background: #000;
    color: #10b981;
    padding: 18px;
    border-radius: 10px;
    display: block;
    font-family: 'Fira Code', monospace;
    line-height: 1.6;
    border: 1px solid #333;
    overflow-x: auto;
    white-space: pre;
    font-size: 0.9rem;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary);
    color: white;
    border: none;
    padding: 7px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.copy-btn:hover {
    filter: brightness(1.2);
}

.copy-btn.copied {
    background: var(--accent);
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 10px;
    transition: 0.2s;
    font-size: 0.9rem;
}

.btn:hover {
    filter: brightness(1.1);
}

.warning-box {
    background: #7c2d12;
    border: 1px solid #ea580c;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
}

.warning-box strong {
    color: #fb923c;
}

.info-box {
    background: #1e3a8a;
    border: 1px solid #3b82f6;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
}

.info-box strong {
    color: #60a5fa;
}

.success-box {
    background: #14532d;
    border: 1px solid #10b981;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
}

.success-box strong {
    color: #34d399;
}

.danger-box {
    background: #450a0a;
    border: 1px solid var(--red);
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
}

.danger-box strong {
    color: var(--red);
}

/* Tabs for options */
.option-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.option-tab {
    padding: 15px 20px;
    border-radius: 8px;
    background: #1e293b;
    border: 1px solid #334155;
    cursor: pointer;
    transition: 0.2s;
    flex: 1;
    min-width: 280px;
}

.option-tab:hover {
    background: #334155;
}

.option-tab.active {
    background: var(--primary);
    border-color: var(--primary);
}

.option-tab strong {
    display: block;
    margin-bottom: 5px;
}

.option-content {
    display: none;
}

.option-content.active {
    display: block;
}

/* Security Lists Grid */
.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.security-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 20px;
    transition: 0.2s;
}

.security-card:hover {
    border-color: var(--red);
    background: #27303f;
}

.security-card h4 {
    color: var(--red);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.security-card .stats {
    color: #64748b;
    font-size: 0.85rem;
    margin: 10px 0;
}

.security-card .badge {
    display: inline-block;
    background: var(--red);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-top: 5px;
}

/* Lists */
ul, ol {
    line-height: 1.8;
}

p {
    line-height: 1.7;
    margin: 12px 0;
}

/* Responsive */
@media (max-width: 1024px) {
    nav {
        width: 220px;
        padding: 20px;
    }

    main {
        padding: 30px;
    }

    .content-container {
        max-width: 100%;
    }

    h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    nav {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #334155;
    }

    main {
        padding: 20px;
    }

    .option-tab {
        min-width: 100%;
    }

    .security-grid {
        grid-template-columns: 1fr;
    }
}
