/* Basic styling for Pirate Island website */
body {
    font-family: 'Courier New', monospace;
    background-color: #0a192f;
    color: #ccd6f6;
    margin: 0;
    padding: 0;
}

html, body { height: 100%; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 20px 0;
    background-color: #112240;
    border-bottom: 2px solid #64ffda;
}

header h1 {
    color: #64ffda;
    font-size: 2.5rem;
    margin: 0;
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    background-color: #112240;
    display: flex;
    justify-content: center;
}

nav ul li {
    padding: 15px 20px;
}

nav ul li a {
    color: #ccd6f6;
    text-decoration: none;
    font-weight: bold;
}

nav ul li a:hover,
nav ul li a.active {
    color: #64ffda;
}

main {
    padding: 20px 0;
}

.hero {
    text-align: center;
    padding: 40px 0;
}

.hero h2 {
    color: #64ffda;
    font-size: 2rem;
}

.features {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-top: 40px;
}

.feature {
    flex: 1;
    min-width: 300px;
    max-width: 350px;
    padding: 20px;
    margin: 10px;
    background-color: #112240;
    border: 1px solid #64ffda;
    border-radius: 5px;
}

.form-section {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    background-color: #112240;
    border: 1px solid #64ffda;
    border-radius: 5px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #64ffda;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    background-color: #0a192f;
    color: #ccd6f6;
    border: 1px solid #64ffda;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #64ffda;
    color: #0a192f;
    text-decoration: none;
    border-radius: 3px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    font-family: 'Courier New', monospace;
}

.btn:hover {
    background-color: #4dc1b5;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
}

.form-footer a {
    color: #64ffda;
}

.error-message {
    background-color: #ff3333;
    color: white;
    padding: 10px;
    border-radius: 3px;
    margin-bottom: 20px;
}

.success-message {
    background-color: #33cc33;
    color: white;
    padding: 10px;
    border-radius: 3px;
    margin-bottom: 20px;
}

footer {
    text-align: center;
    padding: 20px 0;
    background-color: #112240;
    border-top: 2px solid #64ffda;
    margin-top: 40px;
}

/* Game client styles */
#game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

#game-canvas {
    border: 2px solid #64ffda;
    background-color: #112240;
}

#chat-container {
    width: 800px;
    margin-top: 20px;
}

#chat-messages {
    height: 150px;
    overflow-y: scroll;
    border: 1px solid #64ffda;
    padding: 10px;
    background-color: #0a192f;
    margin-bottom: 10px;
}

#chat-input {
    width: 100%;
    padding: 10px;
    background-color: #0a192f;
    color: #ccd6f6;
    border: 1px solid #64ffda;
    font-family: 'Courier New', monospace;
}

/* --- Habbo/Club Penguin inspired enhancements --- */
/* Full-viewport client area on game page */
.page--game .container { max-width: 100%; padding-left: 0; padding-right: 0; }
.client-main { padding: 0; height: calc(100vh - 160px); }
#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: none;
    margin-top: 0;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    cursor: pointer;
}

/* Overlay UI bars */
.ui-topbar {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #1f3b6f, #13264a);
    color: #fff;
    padding: 8px 14px;
    display: flex;
    gap: 16px;
    align-items: center;
    box-shadow: 0 2px 0 #0b162b, inset 0 -2px 0 #0b162b;
    border: 2px solid #64ffda;
    border-radius: 6px;
}

.ui-chip { background: rgba(0,0,0,0.25); padding: 4px 8px; border-radius: 4px; }

.pixel-border {
    box-shadow: 0 0 0 2px #64ffda, 0 4px 0 0 #0b162b;
}

/* Chat overlay */
#chat-container {
    position: absolute;
    left: 16px;
    bottom: 16px;
    width: min(520px, 60vw);
}
#chat-messages { background-color: rgba(10, 25, 47, 0.85); backdrop-filter: blur(2px); }
#chat-input { background-color: rgba(10, 25, 47, 0.95); }

/* Navigation as tabs */
nav ul {
    background: linear-gradient(180deg, #1b335f, #102241);
    border-bottom: 2px solid #64ffda;
}
nav ul li { padding: 12px 16px; }
nav ul li a { text-transform: uppercase; letter-spacing: 0.5px; }
nav ul li a:hover,
nav ul li a.active {
    color: #fff;
    text-shadow: 0 0 6px rgba(100,255,218,0.6);
}

/* Panels */
.panel {
    background: #112240;
    border: 2px solid #64ffda;
    border-radius: 6px;
    box-shadow: 0 4px 0 #0b162b;
    padding: 16px;
}

/* AAA UI: grids/cards for profile, inventory, catalog, friends */
.profile-section .profile-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.inventory-section .inventory-items,
.catalog-section .catalog-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    align-items: start;
}

.inventory-item,
.catalog-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 12px;
    align-items: center;
}

.inventory-item .item-preview,
.catalog-item .item-preview {
    display: flex;
    align-items: center;
    justify-content: center;
}

.friends-section .friends-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

/* Pixel-perfect canvas helpers */
.pixel-canvas,
.item-canvas,
#avatar-canvas {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* Small buttons and variants */
.btn-small {
    padding: 6px 12px;
    font-size: 0.9rem;
    border: none;
    border-radius: 3px;
    background-color: #64ffda;
    color: #0a192f;
    cursor: pointer;
    font-family: 'Courier New', monospace;
}

.btn-reject {
    background-color: #ff5555;
    color: #fff;
}
.btn-reject:hover { background-color: #e04444; }

/* Responsive adjustments */
@media (max-width: 800px) {
    .profile-section .profile-content { grid-template-columns: 1fr; }
    .inventory-item, .catalog-item { grid-template-columns: 1fr; }
}
