:root {
    --primary-color: #00ff00; /* Mu Online Green */
    --secondary-color: #1a1a1a;
    --bg-color: #000;
    --text-color: #e0e0e0;
    --panel-bg: rgba(0, 0, 0, 0.85);
    --border-color: #333;
    --hover-color: #00cc00;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    background-image: url('../images/index_132.JPG');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #fff;
    text-shadow: 0 0 5px var(--primary-color);
}

/* Header */
header {
    background: var(--panel-bg);
    padding: 1rem 2rem;
    border-bottom: 3px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.logo span {
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
}

/* Navigation - Horizontal (Top) */
nav.top-nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

nav.top-nav ul li a {
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    padding: 0.5rem 0;
    position: relative;
}

nav.top-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

nav.top-nav ul li a:hover::after {
    width: 100%;
}

/* Main Layout */
.container {
    display: grid;
    grid-template-columns: 220px 1fr 250px;
    gap: 1.5rem;
    padding: 2rem;
    flex: 1;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

/* Sidebar */
aside {
    background: var(--panel-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    height: fit-content;
}

.sidebar-section {
    width: 100%;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: bold;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Vertical Menu */
.vertical-menu {
    list-style: none;
}

.vertical-menu li {
    margin-bottom: 0.5rem;
}

.vertical-menu li a {
    display: block;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    color: #ccc;
    border-left: 3px solid transparent;
}

.vertical-menu li a:hover {
    background: rgba(0, 255, 0, 0.1);
    color: #fff;
    border-left: 3px solid var(--primary-color);
    padding-left: 0.8rem;
}

/* Login Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.login-form label {
    font-size: 0.9rem;
    color: #aaa;
}

.login-form input {
    width: 100%;
    padding: 0.8rem;
    background: #111;
    border: 1px solid #444;
    color: #fff;
    border-radius: 4px;
    font-family: inherit;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn {
    width: 100%;
    padding: 0.8rem;
    background: var(--primary-color);
    color: #000;
    border: none;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.btn:hover {
    background: #00cc00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

/* User Panel Info */
.user-info {
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.user-info strong {
    color: #fff;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.user-actions a {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    background: #333;
    border-radius: 4px;
    font-size: 0.8rem;
}

.user-actions a:hover {
    background: var(--primary-color);
    color: #000;
}

/* Stats */
.stats-list {
    list-style: none;
    font-size: 0.9rem;
}

.stats-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #222;
}

.stats-list li span:last-child {
    font-weight: bold;
    color: #fff;
}

.status-online { color: #00ff00 !important; }
.status-offline { color: #ff0000 !important; }

/* Main Content (Iframe Wrapper) */
.main-content {
    background: rgba(10, 10, 15, 0.95);
    border: 1px solid #333;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 800px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    
    /* Gamer / Tech Borders */
    --corner-size: 20px;
    --border-width: 2px;
    --accent-color: var(--primary-color);
    
    clip-path: polygon(
        0 var(--corner-size), 
        var(--corner-size) 0, 
        100% 0, 
        100% calc(100% - var(--corner-size)), 
        calc(100% - var(--corner-size)) 100%, 
        0 100%
    );
    
    padding: 2px; /* Space for inner border */
}

/* Inner container for the actual content/iframe */
.main-content::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(45deg, transparent 5%, var(--accent-color) 5%, var(--accent-color) 10%, transparent 10%),
                linear-gradient(-45deg, transparent 5%, var(--accent-color) 5%, var(--accent-color) 10%, transparent 10%);
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: top left, bottom right;
    pointer-events: none;
    z-index: 10;
    opacity: 0.5;
}

/* Glow effect at the top */
.main-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    box-shadow: 0 0 10px var(--accent-color);
    z-index: 10;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
    flex: 1;
    background: transparent;
}

/* Footer */
footer {
    background: #000;
    text-align: center;
    padding: 2rem;
    border-top: 1px solid #333;
    font-size: 0.9rem;
    color: #666;
    margin-top: auto;
}

footer p {
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: 200px 1fr 220px;
        padding: 1rem;
    }
}

@media (max-width: 992px) {
    .container {
        grid-template-columns: 200px 1fr;
    }
    
    .right-sidebar {
        display: none;
    }

    .container {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "content"
            "sidebar-right"
            "sidebar-left";
    }

    .main-content { grid-area: content; min-height: 600px; }
    .right-sidebar { grid-area: sidebar-right; display: flex; flex-direction: column; }
    .left-sidebar { grid-area: sidebar-left; display: none; }

    .mobile-menu-toggle {
        display: block;
    }

    nav.top-nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #000;
        padding: 1rem;
        border-bottom: 1px solid var(--primary-color);
    }

    nav.top-nav ul.active {
        display: flex;
    }
    
    nav.top-nav ul li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #222;
        padding: 0.5rem 0;
    }
    
    .left-sidebar {
        display: flex;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
        gap: 1rem;
    }

    .main-content {
        min-height: 500px;
    }
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
}

.news-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #333;
    padding: 1rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    border-left: 3px solid var(--primary-color);
}

.news-card:hover {
    background: rgba(0, 255, 0, 0.05);
    transform: translateX(5px);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.1);
}

.news-date {
    font-size: 0.8rem;
    color: #888;
    margin-right: 1rem;
    min-width: 80px;
}

.news-type {
    background: var(--primary-color);
    color: #000;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-right: 1rem;
    text-transform: uppercase;
}

.news-title {
    color: #fff;
    font-weight: 600;
    flex: 1;
}

/* Admin Table Modern */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.admin-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #333;
    padding: 1rem;
    text-align: center;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.admin-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: var(--primary-color);
    box-shadow: 0 0 5px var(--primary-color);
}

.admin-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 0.5rem;
    display: block;
}

.admin-status {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
}

/* Section Headers in Home */
.section-title {
    font-size: 1.2rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid #333;
    padding-bottom: 0.5rem;
    margin: 1.5rem 1rem 0.5rem 1rem;
    display: flex;
    align-items: center;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    margin-right: 10px;
    transform: rotate(45deg);
}

/* Info Card for Content Pages */
.info-card {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #333;
    padding: 1.5rem;
    margin: 1rem;
    border-radius: 4px;
    color: #ccc;
    line-height: 1.6;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: var(--primary-color);
}

.info-card h3 {
    color: #fff;
    margin-bottom: 1rem;
    border-bottom: 1px solid #444;
    padding-bottom: 0.5rem;
    font-size: 1.1rem;
}

.info-card table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.info-card th, .info-card td {
    padding: 0.8rem;
    border-bottom: 1px solid #444;
    text-align: left;
}

.info-card th {
    color: var(--primary-color);
    font-weight: 600;
}

.info-card tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.info-card ul {
    list-style: none;
    padding-left: 1rem;
}

.info-card ul li::before {
    content: '>';
    color: var(--primary-color);
    margin-right: 0.5rem;
    font-weight: bold;
}

/* Server Chat Widget */
.server-chat-widget {
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid #444;
    border-radius: 4px;
    height: 200px;
    overflow-y: auto;
    padding: 10px;
    font-family: 'Verdana', sans-serif;
    font-size: 12px;
    margin: 1rem;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.9);
    scrollbar-width: thin;
    scrollbar-color: #555 #222;
    position: relative;
}

.server-chat-widget::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
}

.server-chat-widget::-webkit-scrollbar {
    width: 6px;
}
.server-chat-widget::-webkit-scrollbar-track {
    background: #222;
}
.server-chat-widget::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}

.chat-line {
    margin-bottom: 4px;
    line-height: 1.4;
    text-shadow: 1px 1px 0 #000;
    position: relative;
    z-index: 1;
    animation: fadeIn 0.3s ease-out;
}

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

.chat-time {
    color: #888;
    margin-right: 8px;
    font-size: 11px;
    font-family: monospace;
}

.chat-system { color: #aaa; } 
.chat-event { color: #57d9ff; font-weight: bold; } 
.chat-warning { color: #ffcc00; } 
.chat-invasion { color: #ff3333; font-weight: bold; text-shadow: 0 0 5px rgba(255, 0, 0, 0.5); }
.chat-global { color: #f4d442; }
