body {
    background-color: #000;
    color: #fff;
    font-family: 'Courier New', Courier, monospace;
    margin: 0;
    padding: 0;
    /* Hexagon background */
    background:
        radial-gradient(circle at 100% 50%, transparent 20%, rgba(34, 34, 34, 0.5) 21%, rgba(34, 34, 34, 0.5) 34%, transparent 35%, transparent),
        radial-gradient(circle at 0% 50%, transparent 20%, rgba(34, 34, 34, 0.5) 21%, rgba(34, 34, 34, 0.5) 34%, transparent 35%, transparent) 0 -20px,
        radial-gradient(circle at 50% 100%, transparent 10%, rgba(34, 34, 34, 0.5) 11%, rgba(34, 34, 34, 0.5) 24%, transparent 25%, transparent) -20px 0,
        radial-gradient(circle at 50% 0%, transparent 10%, rgba(34, 34, 34, 0.5) 11%, rgba(34, 34, 34, 0.5) 24%, transparent 25%, transparent) 20px 0,
        linear-gradient(150deg, transparent 44%, rgba(34, 34, 34, 0.5) 45%, rgba(34, 34, 34, 0.5) 55%, transparent 56%),
        linear-gradient(30deg, transparent 44%, rgba(34, 34, 34, 0.5) 45%, rgba(34, 34, 34, 0.5) 55%, transparent 56%),
        #000;
    background-size: 40px 40px;
}

header {
    background-color: transparent;
    border-bottom: 1px solid #333;
    padding: 10px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    z-index: 100;
}

.brand-container {
    display: flex;
    flex-direction: column;
}

header h1 {
    margin: 0;
    font-size: 1.5em;
}

header .subtext {
    margin: -5px 0 0 0;
}

nav {
    display: flex;
    flex-direction: row;
}

nav a {
    color: #fff;
    text-decoration: none;
    margin: 0 15px 0 0;
    text-transform: uppercase;
    font-weight: bold;
    border: 1px solid transparent;
    padding: 5px 10px;
}

nav a:hover {
    background-color: #fff;
    color: #000;
}

.container {
    max-width: 90%;
    margin: 40px auto;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.85);
    border: 1px solid #333;
}

@media (max-width: 768px) {
    .container {
        max-width: 1000px;
        margin: 20px auto;
    }
}

h1, h2, h3 {
    color: #fff;
    text-transform: uppercase;
}

.subtext {
    color: #888;
    font-size: 0.9em;
}

.card {
    border: 1px solid #333;
    padding: 20px;
    margin-bottom: 20px;
    background-color: rgba(20, 20, 20, 0.8);
    transition: transform 0.2s, border-color 0.2s;
}

.card:hover {
    border-color: #fff;
    transform: translateY(-5px);
}

.card h2 a {
    color: #fff;
    text-decoration: none;
}

/* Form Styling */
form {
    display: flex;
    flex-direction: column;
}

input, textarea {
    background-color: #111;
    border: 1px solid #333;
    color: #fff;
    padding: 10px;
    margin-bottom: 15px;
    font-family: inherit;
}

    input:focus, textarea:focus {
    outline: none;
    border-color: #fff;
}

#encryption-overlay input[type="text"] {
    background: #000;
    border: 1px solid #f00;
    color: #f00;
}

#encryption-overlay button {
    background: #f00;
    color: #fff;
}

button {
    background-color: #fff;
    color: #000;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
}

button:hover {
    background-color: #ccc;
}

/* Notifications */
.notification {
    max-width: 1000px;
    margin: 10px auto -30px auto;
    padding: 10px 20px;
    border: 1px solid #333;
    font-weight: bold;
    text-transform: uppercase;
}

.notification.success {
    border-color: #0f0;
    color: #0f0;
    background-color: rgba(0, 50, 0, 0.8);
}

.notification.error {
    border-color: #f00;
    color: #f00;
    background-color: rgba(50, 0, 0, 0.8);
}

/* Mobile Responsiveness */
.blog-content h1, .blog-content h2, .blog-content h3 {
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
    margin-top: 25px;
}

.blog-content a {
    color: #0f0;
}

.blog-content code {
    background-color: #222;
    padding: 2px 5px;
    border-radius: 3px;
}

.blog-content pre {
    background-color: #111;
    padding: 15px;
    border: 1px solid #333;
    overflow-x: auto;
}

.blog-content img {
    max-width: 100%;
}

/* Admin Panel Layout */
.admin-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: nowrap; /* Prevent wrapping but we need a better overflow strategy */
    overflow-x: auto; /* Handle overflow at the wrapper level */
    padding-bottom: 20px;
}

.admin-sidebar {
    width: 200px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    background: rgba(20,20,20,0.8);
    border: 1px solid #333;
    padding: 10px;
}

.admin-nav {
    display: flex;
    flex-direction: column;
}

.admin-main {
    flex-grow: 1;
    min-width: 0; /* Important for flex-child to obey its parent's width */
}

/* Ensure cards and tables don't push the layout out */
.card {
    border: 1px solid #333;
    padding: 20px;
    margin-bottom: 20px;
    background-color: rgba(20, 20, 20, 0.8);
    transition: transform 0.2s, border-color 0.2s;
    overflow-x: auto; /* Handle overflow within cards */
}

.admin-main table {
    width: 100%;
    border-collapse: collapse;
}

.admin-main th, .admin-main td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #222;
}

.admin-main th {
    background: #111;
    text-transform: uppercase;
    font-size: 0.8em;
    color: #888;
}

/* Custom scrollbar for better aesthetic */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #000;
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive Overrides */
@media (max-width: 1024px) {
    .admin-wrapper {
        flex-direction: column;
        overflow-x: visible;
    }
    
    .admin-sidebar {
        width: 100%;
        position: static;
        margin-bottom: 20px;
    }
    
    .admin-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .admin-nav a {
        margin: 0;
        font-size: 0.8em;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 1.2em;
    }

    /* Admin Mobile Layout */
    .admin-main {
        width: 100%;
    }

    table {
        display: block;
        overflow-x: auto;
    }
}

.admin-panel {
    border-top: 2px dashed #444;
    margin-top: 50px;
    padding-top: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    border: 1px solid #333;
    padding: 15px;
    text-align: center;
}

.stat-value {
    font-size: 1.5em;
    font-weight: bold;
    display: block;
}

.stat-label {
    color: #888;
    text-transform: uppercase;
    font-size: 0.8em;
}
