/* --- Γενικά & Background --- */
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

body {
    background: url('MADBG.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #e0e0e0;
    font-family: 'VT323', 'Courier New', Courier, monospace;
    margin: 0;
    font-size: 15px; /* ΕΝΗΜΕΡΩΣΗ: Ακόμη πιο μικρό */
    overflow-x: hidden;
}

/* --- Layout --- */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 20px; /* ΕΝΗΜΕΡΩΣΗ */
    background: rgba(10, 10, 20, 0.8);
    border-bottom: 1px solid #00ffff;
    color: #00ffff;
}
.main-header a { color: #ff3399; text-decoration: none; font-size: 16px; /* ΕΝΗΜΕΡΩΣΗ */ }
.main-header a:hover { text-decoration: underline; }

.header-left { display: flex; align-items: center; gap: 18px; /* ΕΝΗΜΕΡΩΣΗ */ }
.profile-link {
    font-size: 15px !important; /* ΕΝΗΜΕΡΩΣΗ */
    border: 1px solid #ff3399;
    padding: 3px 7px; /* ΕΝΗΜΕΡΩΣΗ */
    transition: all 0.2s ease;
}
.profile-link:hover { background: #ff3399; color: #121212; text-decoration: none; }

.home-title-link { color: inherit; text-decoration: none; }
.home-title-link h1 { margin: 0; font-size: 1.8em; /* ΕΝΗΜΕΡΩΣΗ */ }

.main-grid-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    padding: 12px; /* ΕΝΗΜΕΡΩΣΗ */
    gap: 12px; /* ΕΝΗΜΕΡΩΣΗ */
    align-items: stretch; /* ΕΝΗΜΕΡΩΣΗ */
}

.builder-column, .community-column, .gamification-column { min-width: 0; display: flex; flex-direction: column; }
.community-column .panel, .builder-column .panel { flex-grow: 1; }

#community-builds-list { overflow-y: auto; flex-grow: 1; }

/* --- Panels & Forms --- */
.panel { background: rgba(18, 18, 30, 0.85); border: 1px solid #334; padding: 18px; /* ΕΝΗΜΕΡΩΣΗ */ box-shadow: 0 0 15px rgba(0, 255, 255, 0.1); backdrop-filter: blur(5px); display: flex; flex-direction: column; }
.panel h2 { color: #00ffff; margin-top: 0; text-align: center; border-bottom: 1px solid #ff3399; padding-bottom: 6px; /* ΕΝΗΜΕΡΩΣΗ */ margin-bottom: 12px; /* ΕΝΗΜΕΡΩΣΗ */ font-size: 1.4em; /* ΕΝΗΜΕΡΩΣΗ */ flex-shrink: 0; }
.panel h3 { color: #ff3399; margin: 0 0 5px 0; font-size: 1.1em; }
#build-form { display: grid; grid-template-columns: auto 1fr; gap: 8px 10px; /* ΕΝΗΜΕΡΩΣΗ */ align-items: center; }
#build-form label { margin: 0; color: #ff3399; text-align: right; font-size: 16px; /* ΕΝΗΜΕΡΩΣΗ */ }
#build-form input[type="text"]#build_name, #build-form .summary, #build-form button { grid-column: 1 / -1; }
input[type="text"], input[list] { width: 100%; padding: 5px; /* ΕΝΗΜΕΡΩΣΗ */ background: #1a1a2e; border: 1px solid #4a4a70; color: #e0e0e0; font-family: inherit; font-size: 15px; /* ΕΝΗΜΕΡΩΣΗ */ box-sizing: border-box; }
button { background-color: #00ffff; color: #121212; border: none; padding: 8px 15px; /* ΕΝΗΜΕΡΩΣΗ */ font-family: inherit; font-size: 16px; /* ΕΝΗΜΕΡΩΣΗ */ font-weight: bold; cursor: pointer; margin-top: 12px; /* ΕΝΗΜΕΡΩΣΗ */ width: 100%; transition: all 0.2s ease; }
.summary { padding: 10px; /* ΕΝΗΜΕΡΩΣΗ */ border: 1px dashed #4a4a70; }
.community-build-card { background: rgba(30, 30, 50, 0.8); border: 1px solid #4a4a70; padding: 8px 10px; /* ΕΝΗΜΕΡΩΣΗ */ transition: all 0.2s ease; }
.community-build-card:not(:last-child){ margin-bottom: 6px; /* ΕΝΗΜΕΡΩΣΗ */ }
.community-build-card:hover { border-color: #ff3399; }
.community-build-card h4 { margin: 0; color: #00ffff; font-size: 15px; /* ΕΝΗΜΕΡΩΣΗ */ display: inline; }
.community-build-card p { margin: 0; display: inline; font-size: 13px; /* ΕΝΗΜΕΡΩΣΗ */ }
.rating-display { font-size: 12px; /* ΕΝΗΜΕΡΩΣΗ */ margin: 3px 0; /* ΕΝΗΜΕΡΩΣΗ */ }
.rating-form { display: flex; gap: 6px; /* ΕΝΗΜΕΡΩΣΗ */ margin-top: 5px; /* ΕΝΗΜΕΡΩΣΗ */ align-items: center; }
.rating-form select { width: 50px; /* ΕΝΗΜΕΡΩΣΗ */ padding: 3px; /* ΕΝΗΜΕΡΩΣΗ */ font-size: 12px; /* ΕΝΗΜΕΡΩΣΗ */ }
.rating-form button { width: auto; margin-top: 0; padding: 3px 7px; /* ΕΝΗΜΕΡΩΣΗ */ font-size: 12px; /* ΕΝΗΜΕΡΩΣΗ */ }

/* --- GAMIFICATION & PROFILE STYLING --- */
.gamification-column { gap: 12px; /* ΕΝΗΜΕΡΩΣΗ */ }
.leaderboard-panel { flex-grow: 1; }
.progress-panel { flex-shrink: 0; }
.profile-stats p { font-size: 18px; /* ΕΝΗΜΕΡΩΣΗ */ margin: 4px 0; /* ΕΝΗΜΕΡΩΣΗ */ text-align: center; }
.profile-stats p strong { color: #00ffff; }
.badges-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; /* ΕΝΗΜΕΡΩΣΗ */ justify-content: center; margin-top: 10px; /* ΕΝΗΜΕΡΩΣΗ */ }
.badge-item { background: rgba(40, 40, 60, 0.9); border: 1px solid #ff3399; padding: 4px 8px; /* ΕΝΗΜΕΡΩΣΗ */ display: flex; align-items: center; gap: 6px; /* ΕΝΗΜΕΡΩΣΗ */ transition: all 0.2s ease; cursor: help; }
.badge-item i { font-size: 16px; /* ΕΝΗΜΕΡΩΣΗ */ color: #00ffff; }
.badge-item span { font-size: 14px; /* ΕΝΗΜΕΡΩΣΗ */ }
.no-badges { text-align: center; color: #888; margin-top: 10px; /* ΕΝΗΜΕΡΩΣΗ */ }
.leaderboard-list { list-style: none; padding: 0; flex-grow: 1; overflow-y: auto; }
.leaderboard-list li { display: flex; align-items: center; gap: 10px; /* ΕΝΗΜΕΡΩΣΗ */ padding: 6px 5px; /* ΕΝΗΜΕΡΩΣΗ */ border-bottom: 1px solid #4a4a70; }
.leaderboard-list .rank { font-size: 16px; /* ΕΝΗΜΕΡΩΣΗ */ color: #ff3399; font-weight: bold; min-width: 25px; text-align: center; }
.leaderboard-list .xp { font-size: 15px; /* ΕΝΗΜΕΡΩΣΗ */ font-weight: bold; color: #00ffff; }

/* --- ΑΙΩΡΟΥΜΕΝΟ CHAT (MODAL) --- */
#chat-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(10, 10, 20, 0.7); backdrop-filter: blur(5px); z-index: 1999; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
#chat-overlay.open { opacity: 1; pointer-events: auto; }
#chat-fab { position: fixed; bottom: 20px; /* ΕΝΗΜΕΡΩΣΗ */ right: 20px; /* ΕΝΗΜΕΡΩΣΗ */ width: 50px; height: 50px; background-color: #00ffff; color: #121212; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 24px; cursor: pointer; box-shadow: 0 4px 15px rgba(0, 255, 255, 0.4); z-index: 1000; transition: all 0.3s ease; }
#chat-fab:hover { transform: scale(1.1); background-color: #fff; }
#chat-window { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9); width: 380px; max-width: 90vw; height: 80vh; max-height: 550px; background: rgba(18, 18, 30, 0.95); border: 1px solid #00ffff; box-shadow: 0 0 30px rgba(0, 255, 255, 0.3); z-index: 2000; display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; opacity: 0; pointer-events: none; transition: opacity 0.3s ease, transform 0.3s ease; }
#chat-window.open { opacity: 1; transform: translate(-50%, -50%) scale(1); pointer-events: auto; }
.chat-window-header { display: flex; justify-content: space-between; align-items: center; padding: 0 15px; background: rgba(10, 10, 20, 0.8); border-bottom: 1px solid #ff3399; flex-shrink: 0; }
.chat-window-header h2 { border-bottom: none; margin: 0; padding: 8px 0; font-size: 16px; /* ΕΝΗΜΕΡΩΣΗ */ }
#chat-close-btn { background: none; border: none; color: #ff3399; font-size: 28px; /* ΕΝΗΜΕΡΩΣΗ */ cursor: pointer; padding: 0 10px; line-height: 1; }
#chat-box { flex-grow: 1; overflow-y: auto; padding: 12px; background: none; }
#chat-form { padding: 10px; /* ΕΝΗΜΕΡΩΣΗ */ border-top: 1px solid #334; flex-shrink: 0; display: flex; gap: 10px; }
#chat-form input { flex-grow: 1; }
#chat-form button { margin-top: 0; width: auto; }
.chat-message .meta { display: flex; align-items: baseline; gap: 8px; font-size: 0.9em; margin-bottom: 3px; }
.chat-message .meta .username { font-weight: bold; color: #ff3399; }
.chat-message.is-own .meta .username { color: #00ffff; }
.chat-message .text { word-wrap: break-word; }

/* --- RESPONSIVE LAYOUT --- */
@media (max-width: 1200px) { .main-grid-container { grid-template-columns: 1fr 1fr; } .panel { height: auto; } }
@media (max-width: 768px) { .main-grid-container { grid-template-columns: 1fr; padding: 10px; } .main-header { flex-direction: column; gap: 15px; } #build-form { grid-template-columns: 1fr; } #build-form label { text-align: left; } #chat-fab { bottom: 15px; right: 15px; } }