* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #000;
    color: #d0d0d0;
    font-family: 'JetBrains Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 205px;
    background-color: #000;
    border-right: 1px solid #837A6C;
    padding: 40px 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.nav.mobile-hidden {
    transform: translateX(-100%);
}

.mobile-nav-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: #837A6C;
    color: #000;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
}

.nav-header {
    color: #837A6C;
    font-size: 12px;
    padding: 0 30px 15px;
    margin-bottom: 10px;
    border-bottom: 1px solid #837A6C;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lang-btn {
    background: none;
    border: 1px solid #837A6C;
    color: #808080;
    font-size: 12px;
    padding: 6px 15px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.3s ease;
    margin: 10px 25px;
    display: inline-block;
    text-align: center;
    min-width: 60px;
}

.lang-btn:hover {
    color: #f2f2f2;
    background-color: #0a0a0a;
    border-left: 2px solid #f2f2f2;
}

.lang-btn:active,
.lang-btn.active {
    color: #f2f2f2;
    background-color: #0a0a0a;
    border-left: 2px solid #f2f2f2;
}

.vlsm-home-section {
    text-align: center;
    margin: 40px 0;
    width: 100%;
}

.vlsm-home-btn {
    background: none;
    border: 2px solid #837A6C;
    color: #f2f2f2;
    font-size: 16px;
    padding: 15px 30px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.3s ease;
    text-transform: lowercase;
    display: inline-block;
}

.vlsm-home-btn:hover {
    border-color: #f2f2f2;
    color: #f2f2f2;
    transform: translateY(-2px);
}

.vlsm-calc-btn {
    background: none;
    border: 1px solid #837A6C;
    color: #808080;
    font-size: 12px;
    padding: 8px 25px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.3s ease;
    margin: 10px 25px;
    display: block;
    width: calc(100% - 50px);
    text-align: left;
    text-transform: lowercase;
}

.vlsm-calc-btn:hover {
    color: #f2f2f2;
    background-color: #0a0a0a;
    border-left: 2px solid #f2f2f2;
}

.vlsm-calc-btn:active,
.vlsm-calc-btn.active {
    color: #f2f2f2;
    background-color: #0a0a0a;
    border-left: 2px solid #f2f2f2;
}

.vlsm-section {
    background: #000;
    color: #d0d0d0;
    min-height: 100vh;
    padding: 40px 20px;
}

.vlsm-container {
    max-width: 800px;
    margin: 0 auto;
}

.vlsm-title {
    color: #f2f2f2;
    font-size: 28px;
    margin-bottom: 30px;
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
}

.vlsm-form {
    background: #0a0a0a;
    border: 1px solid #837A6C;
    padding: 30px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    color: #837A6C;
    font-size: 14px;
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
}

.form-input {
    width: 100%;
    padding: 10px 15px;
    background: #000;
    border: 1px solid #837A6C;
    color: #f2f2f2;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #f2f2f2;
}

.host-inputs {
    margin-top: 20px;
}

.host-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.host-input-group {
    display: flex;
    flex-direction: column;
}

.host-input-group label {
    color: #808080;
    font-size: 12px;
    margin-bottom: 5px;
}

.calc-btn {
    width: 100%;
    padding: 15px;
    background: none;
    border: 1px solid #837A6C;
    color: #808080;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.calc-btn:hover {
    background: #837A6C;
    color: #000;
}

.vlsm-results {
    background: #0a0a0a;
    border: 1px solid #837A6C;
    padding: 20px;
    display: none;
}

.vlsm-results.show {
    display: block;
}

.result-header {
    color: #f2f2f2;
    font-size: 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid #837A6C;
    padding-bottom: 10px;
}

.subnet-result {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #333;
    background: #111;
}

.subnet-title {
    color: #837A6C;
    font-size: 16px;
    margin-bottom: 10px;
}

.subnet-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    font-size: 14px;
}

.info-item {
    color: #d0d0d0;
}

.info-item span {
    color: #808080;
}

.lang-btn:hover {
    border-color: #f2f2f2;
    color: #f2f2f2;
}

.lang-btn:active {
    transform: scale(0.95);
}

.lang-active {
    color: #f2f2f2;
    font-weight: bold;
}

.lang-inactive {
    color: #837A6C;
}

.nav a {
    color: #808080;
    text-decoration: none;
    font-size: 14px;
    padding: 12px 25px;
    transition: all 0.3s ease;
    border-left: 2px solid transparent;
    cursor: pointer;
}

.nav a:hover {
    color: #f2f2f2;
    background-color: #0a0a0a;
    border-left-color: #f2f2f2;
}

.nav a.active {
    color: #f2f2f2;
    background-color: #0a0a0a;
    border-left-color: #f2f2f2;
}

.author-card-section {
    margin-top: 60px;
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 0 20px;
}

.author-card {
    background-color: #0a0a0a;
    border: 1px solid #837A6C;
    border-radius: 12px;
    padding: 35px;
    width: 100%;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.author-card:hover {
    border-color: #f2f2f2;
    background-color: #111;
}

.author-icon {
    width: 100px;
    height: 100px;
    background-color: #837A6C;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.author-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.author-name {
    color: #f2f2f2;
    font-size: 20px;
    margin: 0;
    font-weight: bold;
}

.author-links-horizontal {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.link-separator {
    color: #837A6C;
    font-size: 14px;
}

.author-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.author-card-link {
    color: #808080 !important;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 0;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.author-card-link:hover {
    color: #f2f2f2 !important;
    border-bottom-color: #837A6C;
}

.author-card-link:visited {
    color: #808080 !important;
}

.author-card-link:visited:hover {
    color: #f2f2f2 !important;
}

.footer {
    background-color: #000;
    border-top: 1px solid #837A6C;
    padding: 20px 0;
    margin-top: 40px;
    margin-left: 200px;
    transition: margin-left 0.3s ease;
}

.footer.mobile {
    margin-left: 0;
}

.footer-content {
    text-align: center;
    color: #808080;
    font-size: 14px;
}

.footer-link {
    color: #f2f2f2 !important;
    text-decoration: none;
}

.footer-link:hover {
    color: #837A6C !important;
    text-decoration: underline;
}

.footer-link:visited {
    color: #f2f2f2 !important;
}

.footer-link:visited:hover {
    color: #837A6C !important;
}

.author-info {
    margin-bottom: 30px;
    padding: 15px 0;
    border-bottom: 1px solid #837A6C;
}

.author-item {
    margin-bottom: 8px;
}

.author-label {
    color: #837A6C;
    font-size: 14px;
    margin-right: 8px;
}

.author-main-link {
    color: #f2f2f2 !important;
    text-decoration: none;
    font-weight: bold;
}

.author-main-link:hover {
    color: #837A6C !important;
    text-decoration: underline;
}

.author-links-horizontal {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-secondary-link {
    color: #808080 !important;
    text-decoration: none;
    font-size: 14px;
}

.author-secondary-link:hover {
    color: #f2f2f2 !important;
    text-decoration: underline;
}

.separator {
    color: #837A6C;
    font-size: 14px;
}

.author-main-link:visited,
.author-secondary-link:visited {
    color: inherit !important;
}

.author-main-link:visited:hover {
    color: #837A6C !important;
}

.author-secondary-link:visited:hover {
    color: #f2f2f2 !important;
}

a[href^="http"], a[href^="https://"] {
    color: #808080 !important;
    text-decoration: none;
}

a[href^="http"]:hover, a[href^="https://"]:hover {
    color: #f2f2f2 !important;
    text-decoration: underline;
}

a[href^="http"]:visited, a[href^="https://"]:visited {
    color: #808080 !important;
}

a[href^="http"]:visited:hover, a[href^="https://"]:visited:hover {
    color: #f2f2f2 !important;
}

main {
    margin-left: 205px;
    min-height: 100vh;
    padding: 40px;
    transition: margin-left 0.3s ease;
}

.main-mobile {
    margin-left: 0;
}

.section {
    display: none;
    min-height: calc(100vh - 80px);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    color: #f2f2f2;
    font-size: 32px;
    margin-bottom: 10px;
    text-align: center;
    border-bottom: 1px solid #837A6C;
    padding-bottom: 10px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: -40px;
    right: -40px;
    height: 1px;
    background-color: #837A6C;
    z-index: 1;
}

.section-subtitle {
    color: #837A6C;
    font-size: 16px;
    text-align: center;
    margin: 10px 0 40px 0;
    font-style: italic;
    opacity: 0.9;
}

.content-wrapper {
    max-width: 1000px;
}

.status-line {
    color: #00ff00;
    font-size: 14px;
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
}

.intro-text {
    text-align: center;
    margin-bottom: 40px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stats-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.stats-grid {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.stat-item {
    background-color: #0a0a0a;
    border: 1px solid #837A6C;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    min-width: 180px;
    justify-content: center;
    white-space: nowrap;
}

.stat-item:hover {
    border-color: #f2f2f2;
    background-color: #111;
}

.stat-label {
    color: #837A6C;
}

.stat-value {
    color: #f2f2f2;
}

.vlsm-calculator {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.calculator-panel, .results-panel {
    background-color: #0a0a0a;
    border: 1px solid #837A6C;
    padding: 25px;
}

.calculator-panel h3, .results-panel h3 {
    color: #f2f2f2;
    margin-bottom: 20px;
    font-size: 18px;
    border-bottom: 1px solid #837A6C;
    padding-bottom: 10px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    color: #837A6C;
    margin-bottom: 5px;
    font-size: 14px;
}

.input-group input {
    width: 100%;
    padding: 10px;
    background-color: #000;
    border: 1px solid #837A6C;
    color: #f2f2f2;
    font-family: 'JetBrains Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
}

.input-group input:focus {
    outline: none;
    border-color: #f2f2f2;
}

.subnet-inputs h4 {
    color: #f2f2f2;
    margin-bottom: 15px;
    font-size: 16px;
}

.subnet-item {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.subnet-name, .subnet-hosts {
    padding: 8px;
    background-color: #000;
    border: 1px solid #837A6C;
    color: #f2f2f2;
    font-family: 'JetBrains Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
}

.btn-remove {
    background-color: #ff4444;
    border: none;
    color: white;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 12px;
}

.btn-remove:hover {
    background-color: #ff6666;
}

.btn-primary, .btn-secondary {
    padding: 12px 20px;
    border: 1px solid #837A6C;
    background-color: #000;
    color: #f2f2f2;
    font-family: 'JetBrains Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
    cursor: pointer;
    margin: 10px 5px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #0066cc;
    border-color: #0066cc;
}

.btn-primary:hover {
    background-color: #0088ff;
    border-color: #0088ff;
}

.btn-secondary:hover {
    background-color: #0a0a0a;
    border-color: #f2f2f2;
}

.vlsm-result-item {
    background-color: #000;
    border: 1px solid #837A6C;
    margin: 15px 0;
    padding: 20px;
}

.vlsm-result-item h4 {
    color: #00ff00;
    margin-bottom: 15px;
    font-size: 16px;
}

.result-detail {
    display: grid;
    grid-template-columns: 150px 1fr;
    margin: 5px 0;
    font-size: 14px;
}

.result-label {
    color: #837A6C;
}

.result-value {
    color: #f2f2f2;
    font-family: 'JetBrains Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
}

.content-section {
    font-size: 15px;
    line-height: 1.7;
}

.content-section h1, .content-section h2 {
    color: #f2f2f2;
    margin: 30px 0 20px 0;
    border-bottom: 1px solid #837A6C;
    padding-bottom: 10px;
}

.content-section h3, .content-section h4 {
    color: #f2f2f2;
    margin: 25px 0 15px 0;
}

.content-section h5, .content-section h6 {
    color: #d0d0d0;
    margin: 20px 0 10px 0;
}

.content-section p {
    color: #d0d0d0;
    margin-bottom: 15px;
}

.content-section ul, .content-section ol {
    margin: 15px 0 15px 30px;
}

.content-section li {
    color: #d0d0d0;
    margin-bottom: 8px;
}

.content-section strong {
    color: #f2f2f2;
    font-weight: bold;
}

.content-section em {
    color: #837A6C;
    font-style: italic;
}

.content-section code {
    background-color: #0a0a0a;
    border: 1px solid #837A6C;
    padding: 2px 6px;
    font-family: 'JetBrains Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
    color: #00ff88;
    font-size: 14px;
}

.content-section pre {
    background-color: #0a0a0a;
    border: 1px solid #837A6C;
    padding: 20px;
    margin: 20px 0;
    overflow-x: auto;
    font-family: 'JetBrains Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
    color: #00ff88;
    line-height: 1.4;
}

.content-section pre code {
    background: none;
    border: none;
    padding: 0;
    color: #00ff88;
}

.content-section blockquote {
    border-left: 3px solid #837A6C;
    padding-left: 15px;
    margin: 20px 0;
    color: #837A6C;
    font-style: italic;
}

.content-section a {
    color: #00aaff;
    text-decoration: none;
}

.content-section a:hover {
    color: #33ccff;
    text-decoration: underline;
}

.content-section table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.content-section th, .content-section td {
    border: 1px solid #837A6C;
    padding: 10px;
    text-align: left;
}

.content-section th {
    background-color: #0a0a0a;
    color: #f2f2f2;
    font-weight: bold;
}

.content-section td {
    color: #d0d0d0;
}

@media (max-width: 768px) {
    .nav {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: row;
        overflow-x: auto;
        padding: 10px;
        gap: 5px;
    }
    
    .nav a {
        padding: 8px 15px;
        white-space: nowrap;
    }
    
    main {
        margin-left: 0;
        padding: 20px;
    }
    
    .vlsm-calculator {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .subnet-item {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}

#markdown-content {
    animation: fadeInContent 0.6s ease-out;
    opacity: 0;
    animation-fill-mode: forwards;
    line-height: 1.8;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}