/* Reset and Base */
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    padding: 0;
    background-color: #000;
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 11px;
    color: #333;
}
a {
    color: #0033cc;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Fake Browser Chrome */
.browser-chrome {
    background: #2a2a2a;
    border-bottom: 2px solid #111;
    height: 30px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: #ccc;
    font-family: Arial, sans-serif;
    font-size: 12px;
}
.browser-btn {
    width: 24px;
    height: 20px;
    background: #3a3a3a;
    border: 1px outset #555;
    margin-right: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
.browser-btn:active {
    border: 1px inset #555;
}
.browser-btn.right {
    margin-right: 0;
    margin-left: 4px;
}
.browser-url {
    flex-grow: 1;
    background: #fff;
    color: #000;
    height: 20px;
    line-height: 20px;
    padding: 0 5px;
    margin: 0 10px;
    border: 1px inset #888;
}

/* Main Layout Wrapper */
.main-wrapper {
    position: relative;
    width: 1100px;
    margin: 20px auto;
}

/* The Massive Mechanical Frame */
.game-container {
    width: 900px;
    margin: 0 auto;
    background: url('assets/metal_texture.png') repeat;
    border: 15px solid #4a3b2c; /* Simulate rusty pipe frame */
    border-style: ridge;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.8), 0 0 20px rgba(0,0,0,0.9);
    position: relative;
}

/* Left Floating Avatar Panel */
.avatar-panel {
    position: absolute;
    top: -20px;
    left: -120px;
    width: 180px;
    background: url('assets/metal_texture.png') repeat;
    border: 5px solid #5a5a5a;
    border-style: ridge;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.8);
    z-index: 10;
}
.avatar-name-box {
    background: #000;
    border: 2px solid #0f0; /* Neon green */
    border-radius: 12px;
    text-align: center;
    padding: 2px 0;
    margin-bottom: 8px;
    box-shadow: inset 0 0 5px rgba(0, 255, 0, 0.5);
}
.avatar-name-box .name {
    color: #ff3333;
    font-weight: bold;
    font-size: 11px;
}
.avatar-box-inner {
    background: #111;
    border: 3px inset #666;
    padding: 2px;
    display: flex;
    flex-wrap: wrap;
}
.avatar-image {
    width: 80px;
    height: 80px;
    border: 1px solid #333;
    margin-right: 4px;
}
.avatar-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.avatar-stats {
    width: 65px;
}
.stat-line {
    margin-bottom: 1px;
    font-size: 10px;
    line-height: 1.1;
}
.stat-num.red { color: #ff3333; }
.stat-num.blue { color: #3366ff; }
.stat-label { color: #0f0; }
.stat-val.red { color: #ff3333; }
.avatar-health-bar {
    width: 100%;
    height: 12px;
    background: #000;
    border: 1px inset #555;
    margin-top: 4px;
}
.health-fill {
    width: 80%;
    height: 100%;
    background: #0f0;
}
.cerrar-btn {
    text-align: right;
    margin-top: 4px;
    font-size: 10px;
    color: #fff;
    cursor: pointer;
    text-decoration: underline;
}

/* Header Space Area */
.header-area {
    height: 220px;
    background: url('assets/bg_space.png') center center no-repeat;
    background-size: cover;
    position: relative;
    border-bottom: 2px solid #000;
}
.logo {
    position: absolute;
    top: 20px;
    left: 40%;
    font-size: 32px;
    font-weight: bold;
    font-style: italic;
    color: #aaccee;
    text-shadow: 2px 2px 4px #000, 0 0 10px rgba(100,150,255,0.8);
    font-family: "Times New Roman", Times, serif;
    line-height: 0.9;
}
.header-links {
    position: absolute;
    bottom: 20px;
    right: 20px;
    text-align: right;
    line-height: 1.4;
}
.header-links a {
    color: #ff3333;
    font-weight: bold;
    text-transform: uppercase;
    text-shadow: 1px 1px 0 #000;
}

/* Top Menu */
.top-menu {
    background: #1a2a3a;
    border-top: 1px solid #446688;
    border-bottom: 1px solid #000;
    text-align: center;
    padding: 4px 0;
    color: #fff;
    font-weight: bold;
}
.top-menu a {
    color: #fff;
    padding: 0 5px;
}
.top-menu a:hover {
    color: #ffcc00;
}
.top-menu a.active {
    color: #ffcc00;
}

/* Mechanical Divider */
.mechanical-divider {
    height: 20px;
    background: url('assets/metal_texture.png') repeat-x;
    border-top: 2px solid #888;
    border-bottom: 3px solid #111;
    box-shadow: inset 0 5px 10px rgba(0,0,0,0.5);
}

/* Content Area */
.content-area {
    background: linear-gradient(to bottom, #10325d, #6a8ba6); /* Simulated water/city bg */
    padding: 20px;
    min-height: 400px;
}

/* Widgets Container */
.widgets-container {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

/* Chat Widget */
.chat-widget {
    flex: 1;
    background: #d0e0eb;
    border: 3px inset #fff;
    padding: 2px;
    display: flex;
    flex-direction: column;
}
.chat-messages {
    background: #fff;
    border: 2px inset #ccc;
    height: 250px;
    overflow-y: scroll;
    padding: 4px;
    margin-bottom: 4px;
    font-size: 11px;
}
/* Retro Scrollbar for webkit */
.chat-messages::-webkit-scrollbar {
    width: 16px;
}
.chat-messages::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-left: 1px solid #ccc;
}
.chat-messages::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border: 1px outset #fff;
}
.chat-line {
    margin-bottom: 2px;
}
.chat-channel { color: #6699ff; }
.chat-user { font-weight: bold; color: #0000cc; }
.chat-user.me { color: #cc0000; }
.chat-text { color: #666; }

.chat-controls {
    background: #e6cd98; /* Tan color */
    border: 2px outset #fff;
    padding: 5px;
}
.chat-row {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}
.chat-row label {
    width: 90px;
    font-weight: bold;
}
.chat-input {
    flex: 1;
    border: 2px inset #ccc;
    height: 18px;
    margin-right: 4px;
}
.chat-input-small {
    width: 30px;
    border: 2px inset #ccc;
    height: 18px;
    margin-right: 10px;
}
.btn-enviar {
    background: #eee;
    border: 2px outset #fff;
    cursor: pointer;
    font-family: Tahoma;
    font-size: 11px;
    padding: 0 5px;
    height: 20px;
}
.btn-enviar:active {
    border: 2px inset #fff;
}
.chat-options {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
}
.global-status { color: #0000cc; }
.chat-select { font-size: 10px; border: 1px solid #999; }
.btn-x { background: #eee; border: 1px outset #fff; cursor: pointer; padding: 0 4px; }

/* Map Widget */
.map-widget {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.map-view {
    border: 3px inset #fff;
    height: 220px;
    background: #000;
}
.map-view img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.map-info {
    background: #d49f6a; /* Orange/tan */
    border: 3px outset #e6b88a;
    padding: 8px;
    margin-top: 4px;
    position: relative;
    height: 60px;
}
.map-desc {
    color: #000;
    line-height: 1.4;
}
.map-action {
    position: absolute;
    bottom: 5px;
    right: 5px;
}
.btn-mover {
    background: #993399;
    background: linear-gradient(to bottom, #b34db3, #800080);
    border: 2px solid #fff;
    border-radius: 12px;
    color: #fff;
    font-weight: bold;
    padding: 3px 15px;
    cursor: pointer;
    font-family: Tahoma;
    font-size: 12px;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Bottom Tables */
.bottom-tables-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 10px;
}
.retro-table-box {
    flex: 1;
    background: #cceeff; /* Light cyan */
    border: 2px inset #fff;
}
.table-header {
    text-align: center;
    font-weight: bold;
    padding: 2px;
    background: transparent;
    color: #000;
    margin-bottom: 2px;
}
.btn-refresh {
    background: #0066cc;
    color: #fff;
    border: 1px solid #000;
    border-radius: 3px;
    padding: 0 3px;
    cursor: pointer;
    font-size: 10px;
}
.retro-table {
    width: 100%;
    border-collapse: collapse;
}
.retro-table td {
    border: 1px solid #77bbcc;
    padding: 2px 4px;
    background: #eeffff;
}
.hero-name.red { color: #cc0000; font-weight: bold; }
.icon-small {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #ff0000;
}
.icon-small.blue-box { background: #0066cc; }
.buildings-table td {
    background: #e6f7ff;
}
.align-right { text-align: right; }
.align-center { text-align: center; }
.btn-cancel {
    background: #eee;
    border: 1px outset #fff;
    cursor: pointer;
}
