/* Galactic Starcruiser Datapad Theme and Stylesheet */

@font-face {
    font-family: "MorrisSansCondensedMedium";
    src: url('../assets/font/MorrisSansCondensedMedium.ttf') format("truetype");
}

@font-face {
    font-family: "MorrisSansCondensedLight";
    src: url('../assets/font/MorrisSansCondensedLight.ttf') format("truetype");
}

@font-face {
    font-family: "Aurebesh";
    src: url('../assets/font/AurebeshNeue.ttf') format("truetype");
}

/* Global Variables */
:root {
    --bg-dark: #030812;
    --panel-bg: #091526;
    --panel-border: #142f54;
    --cyan-glow: #00f0ff;
    --cyan-dim: #008fa3;
    --cyan-bg: rgba(0, 240, 255, 0.05);
    --cyan-bg-hover: rgba(0, 240, 255, 0.15);
    --text-color: #e2f1ff;
    --text-dim: #7f9bb8;
    --red-alert: #ff2d55;
    --yellow-alert: #ffcc00;
    --transition-speed: 0.25s;
    --header-font: "MorrisSansCondensedMedium", sans-serif;
    --body-font: "MorrisSansCondensedLight", "Segoe UI", Roboto, sans-serif;
}

* {
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--cyan-dim) var(--bg-dark);
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
*::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
*::-webkit-scrollbar-thumb {
    background-color: var(--cyan-dim);
    border-radius: 3px;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-dark);
    color: var(--text-color);
    font-family: var(--body-font);
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Outer Device Frame simulation */
#app-container {
    width: 100%;
    height: 100%;
    max-width: 1200px;
    max-height: 900px;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-dark);
    border: 2px solid var(--panel-border);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.15);
    position: relative;
    overflow: hidden;
}

/* Header styling */
header {
    background: linear-gradient(180deg, #09172b 0%, #030812 100%);
    border-bottom: 2px solid var(--cyan-dim);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    user-select: none;
}

header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    box-shadow: 0 0 8px var(--cyan-glow);
}

.header-title-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo {
    height: 38px;
    filter: drop-shadow(0 0 4px var(--cyan-glow));
}

.header-text {
    display: flex;
    flex-direction: column;
}

.header-main-title {
    font-family: var(--header-font);
    font-size: 22px;
    letter-spacing: 2px;
    color: var(--cyan-glow);
    text-shadow: 0 0 5px rgba(0, 240, 255, 0.7);
    margin: 0;
}

.header-subtitle {
    font-family: 'Aurebesh', sans-serif;
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin: 0;
}

.header-status-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: var(--text-dim);
    font-family: var(--header-font);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--cyan-glow);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--cyan-glow);
    animation: pulse 2s infinite alternate;
}

/* Navigation Menu */
nav {
    display: flex;
    background-color: #050d18;
    border-bottom: 1px solid var(--panel-border);
    justify-content: space-around;
    padding: 5px 0;
}

.nav-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 5px;
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-family: var(--header-font);
    font-size: 13px;
    letter-spacing: 1px;
    transition: all var(--transition-speed);
    position: relative;
    gap: 5px;
}

.nav-tab img {
    height: 28px;
    opacity: 0.6;
    transition: all var(--transition-speed);
}

.nav-tab:hover {
    color: var(--cyan-glow);
    background-color: rgba(0, 240, 255, 0.02);
}

.nav-tab:hover img {
    opacity: 0.9;
    filter: drop-shadow(0 0 3px var(--cyan-glow));
}

.nav-tab.active {
    color: var(--cyan-glow);
    background-color: var(--cyan-bg);
}

.nav-tab.active img {
    opacity: 1;
    filter: drop-shadow(0 0 5px var(--cyan-glow));
}

.nav-tab.active::bottom-line {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 2px;
    background-color: var(--cyan-glow);
    box-shadow: 0 0 6px var(--cyan-glow);
}

/* Main Display Panels */
main {
    flex: 1;
    position: relative;
    display: flex;
    overflow: hidden;
}

.panel-content {
    display: none;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
}

.panel-content.active {
    display: flex;
}

/* COMMS (CHAT) VIEW */
#comms-panel {
    flex-direction: row;
}

#contacts-sidebar {
    width: 280px;
    border-right: 2px solid var(--panel-border);
    display: flex;
    flex-direction: column;
    background-color: #040a14;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 15px;
    font-family: var(--header-font);
    font-size: 16px;
    letter-spacing: 1.5px;
    color: var(--text-color);
    border-bottom: 1px solid var(--panel-border);
    text-shadow: 0 0 3px rgba(226, 241, 255, 0.5);
    background-color: #060f1e;
}

.contacts-list {
    flex: 1;
    overflow-y: auto;
    padding: 5px;
}

.contact-card {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 12px;
    background-color: #020813;
    border: 2px solid var(--panel-border);
    border-radius: 2px;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.contact-card:hover {
    background-color: #040f25;
    border-color: #fff;
}

.contact-card.active {
    background-color: rgba(0, 240, 255, 0.05);
    border-color: #fff;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}

.contact-avatar-wrapper {
    position: relative;
    margin-right: 12px;
}

.contact-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--text-dim);
    object-fit: cover;
    background-color: #0c1626;
}

.contact-card.active .contact-avatar {
    border-color: var(--cyan-glow);
    box-shadow: 0 0 6px var(--cyan-dim);
}

.contact-faction-pip {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid #000;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #000;
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.contact-name {
    font-family: var(--header-font);
    font-size: 15px;
    letter-spacing: 1px;
    margin: 0 0 3px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-subtitle {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Chat Main Workspace */
#chat-workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #030812;
    position: relative;
}

#chat-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    text-align: center;
    color: var(--text-dim);
}

#chat-empty-state img {
    height: 120px;
    opacity: 0.2;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px var(--cyan-glow));
}

#chat-empty-state h3 {
    font-family: var(--header-font);
    font-size: 20px;
    color: var(--text-color);
    letter-spacing: 2px;
    margin: 0 0 10px 0;
}

#chat-active-window {
    flex: 1;
    display: none;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.chat-header {
    padding: 12px 20px;
    border-bottom: 2px solid var(--panel-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #060f1e;
    background-image: url('../assets/states/swgs-chat/swgs-chat-header-greeble.png');
    background-repeat: no-repeat;
    background-position: right center;
    background-size: contain;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header-name {
    font-family: var(--header-font);
    font-size: 18px;
    color: var(--cyan-glow);
    letter-spacing: 1.5px;
    margin: 0;
}

/* Mission selector within chat header */
.chat-mission-selector-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-mission-select {
    background-color: #081424;
    border: 1px solid var(--panel-border);
    color: var(--text-color);
    font-family: var(--header-font);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    max-width: 250px;
}

.chat-mission-select:focus {
    border-color: var(--cyan-glow);
    outline: none;
}

/* Chat Messages Scroller */
#chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 8px;
    line-height: 1.4;
    font-size: 15px;
    position: relative;
    animation: slideUp 0.3s ease-out;
}

/* Character message (Incoming) */
.message-bubble.incoming {
    align-self: flex-start;
    background-color: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-left: 3px solid var(--cyan-glow);
    color: var(--text-color);
}

/* Player message (Outgoing) */
.message-bubble.outgoing {
    align-self: flex-end;
    background-color: rgba(20, 47, 84, 0.6);
    border: 1px solid #1c3e6b;
    border-right: 3px solid var(--text-dim);
    color: #e2f1ff;
}

/* System notifications / Debug messages */
.message-bubble.system {
    align-self: center;
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px dashed var(--panel-border);
    color: var(--text-dim);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 12px;
    border-radius: 12px;
}

.message-bubble.image-step {
    padding: 5px;
    background-color: #040912;
    border: 1px solid var(--cyan-dim);
    border-radius: 6px;
    max-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.message-bubble.image-step img {
    width: 100%;
    border-radius: 4px;
}

.message-image-caption {
    font-size: 11px;
    color: var(--text-dim);
    text-align: center;
    padding: 3px;
    text-transform: uppercase;
}

/* Typist indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 5px 0;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: var(--cyan-glow);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

/* Dialogue Choices area */
#chat-choices-container {
    padding: 15px 20px;
    border-top: 1px solid var(--panel-border);
    background-color: #040912;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dialogue-choice-btn {
    background-color: rgba(9, 21, 38, 0.7);
    border: 1px solid var(--panel-border);
    color: var(--text-color);
    padding: 12px 18px;
    text-align: left;
    border-radius: 6px;
    font-family: var(--body-font);
    font-size: 15px;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dialogue-choice-btn:hover {
    background-color: var(--cyan-bg);
    border-color: var(--cyan-glow);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
    padding-left: 24px;
}

.dialogue-choice-btn::before {
    content: '▶';
    font-size: 10px;
    color: var(--cyan-glow);
    margin-right: 10px;
    opacity: 0;
    transition: all var(--transition-speed);
}

.dialogue-choice-btn:hover::before {
    opacity: 1;
}

/* Archivist Overlay (Debug Info) */

.archivist-btn {
    background-color: rgba(9, 21, 38, 0.8);
    border: 1px solid var(--panel-border);
    color: var(--yellow-alert);
    font-family: var(--header-font);
    font-size: 11px;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    text-shadow: 0 0 3px rgba(255, 204, 0, 0.4);
}

.archivist-btn:hover {
    border-color: var(--yellow-alert);
    background-color: rgba(255, 204, 0, 0.05);
}

#debug-drawer {
    position: absolute;
    top: 0;
    right: 0;
    width: 320px;
    height: 100%;
    background-color: rgba(4, 10, 20, 0.95);
    border-left: 2px solid var(--yellow-alert);
    z-index: 150;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform var(--transition-speed) ease-in-out, visibility var(--transition-speed);
    display: flex;
    flex-direction: column;
    padding: 15px;
    font-family: monospace;
    font-size: 12px;
    color: #a0c2e0;
}

#debug-drawer.open {
    transform: translateX(0);
    visibility: visible;
}

.debug-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.debug-title {
    font-family: var(--header-font);
    color: var(--yellow-alert);
    font-size: 14px;
    letter-spacing: 1px;
    margin: 0;
}

.debug-close {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 16px;
}

.debug-section {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.debug-field {
    background-color: #02050b;
    border: 1px solid var(--panel-border);
    padding: 8px;
    border-radius: 4px;
    word-break: break-all;
}

.debug-label {
    color: var(--yellow-alert);
    font-weight: bold;
    margin-bottom: 4px;
    font-size: 10px;
    text-transform: uppercase;
}

/* MAP PANEL VIEW */
#map-panel {
    flex-direction: column;
}

#map-header-bar {
    padding: 10px 20px;
    border-bottom: 1px solid var(--panel-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #040a14;
}

.deck-selector {
    display: flex;
    gap: 8px;
}

.deck-btn {
    background-color: #081424;
    border: 1px solid var(--panel-border);
    color: var(--text-color);
    font-family: var(--header-font);
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    letter-spacing: 1px;
}

.deck-btn:hover {
    border-color: var(--cyan-glow);
    background-color: var(--cyan-bg);
}

.deck-btn.active {
    border-color: var(--cyan-glow);
    background-color: var(--cyan-bg);
    color: var(--cyan-glow);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

.map-info-text {
    font-family: var(--header-font);
    font-size: 14px;
    letter-spacing: 1px;
    color: var(--text-dim);
}

#map-viewport {
    flex: 1;
    position: relative;
    overflow: auto;
    background-color: #02050a;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#map-image-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
    max-height: 100%;
}

#map-deck-image {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    border: 1px solid var(--panel-border);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    opacity: 0.9;
}

.map-marker {
    position: absolute;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10;
    transition: transform var(--transition-speed);
}

.map-marker::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    margin-top: -6px;
    margin-left: -6px;
    background-color: var(--cyan-glow);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--cyan-glow), 0 0 20px var(--cyan-glow);
    animation: markerPulse 1.5s infinite;
}

.map-marker:hover {
    transform: translate(-50%, -50%) scale(1.3);
}

.map-marker.active::before {
    background-color: var(--yellow-alert);
    box-shadow: 0 0 12px var(--yellow-alert), 0 0 24px var(--yellow-alert);
}

/* Map Popups */
.map-popup {
    position: absolute;
    background-color: rgba(9, 21, 38, 0.92);
    border: 2px solid var(--cyan-dim);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
    border-radius: 6px;
    padding: 12px;
    width: 260px;
    z-index: 15;
    pointer-events: auto;
    font-size: 13px;
    line-height: 1.4;
    display: none;
    transform: translate(-50%, -115%);
}

.map-popup-title {
    font-family: var(--header-font);
    font-size: 14px;
    color: var(--cyan-glow);
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 4px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.map-popup-detail {
    margin-bottom: 6px;
}

.map-popup-detail span {
    color: var(--text-dim);
}

.map-popup-btn {
    width: 100%;
    background-color: var(--cyan-bg);
    border: 1px solid var(--cyan-dim);
    color: var(--text-color);
    font-family: var(--header-font);
    font-size: 11px;
    letter-spacing: 0.5px;
    padding: 5px;
    border-radius: 3px;
    cursor: pointer;
    margin-top: 6px;
}

.map-popup-btn:hover {
    background-color: var(--cyan-bg-hover);
    border-color: var(--cyan-glow);
}

/* Voyage Progression Control panel */
.voyage-progression-panel {
    background-color: #040c1a;
    border: 1px solid var(--panel-border);
    border-bottom: 2px solid var(--cyan-glow);
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 15px;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.05);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-title {
    font-family: var(--header-font);
    font-size: 13px;
    color: var(--yellow-alert);
    letter-spacing: 1px;
    font-weight: bold;
}

.progress-phase-indicator {
    font-family: monospace;
    font-size: 11px;
    color: var(--text-dim);
}

.progress-phase-name {
    font-family: var(--header-font);
    font-size: 17px;
    color: var(--cyan-glow);
    text-shadow: 0 0 6px rgba(0, 240, 255, 0.4);
    letter-spacing: 1px;
    margin: 2px 0;
}

.progress-bar-container {
    height: 6px;
    background-color: #020610;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0, 240, 255, 0.1);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cyan-dim), var(--cyan-glow));
    box-shadow: 0 0 8px var(--cyan-glow);
    transition: width 0.4s ease-out;
}

.progress-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 4px;
}

.progress-nav-btn {
    flex: 1;
    background-color: #081424;
    border: 1px solid var(--panel-border);
    color: var(--text-color);
    font-family: var(--header-font);
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all var(--transition-speed);
}

.progress-nav-btn:hover:not(:disabled) {
    border-color: var(--cyan-glow);
    background-color: var(--cyan-bg);
    color: var(--cyan-glow);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.2);
}

.progress-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* AGENDA PANEL VIEW */
#agenda-panel {
    flex-direction: column;
}

#agenda-days-selector {
    display: flex;
    background-color: #040a14;
    border-bottom: 1px solid var(--panel-border);
}

.agenda-day-tab {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-dim);
    font-family: var(--header-font);
    font-size: 15px;
    letter-spacing: 1px;
    padding: 12px;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.agenda-day-tab:hover {
    color: var(--text-color);
    background-color: rgba(20, 47, 84, 0.2);
}

.agenda-day-tab.active {
    color: var(--cyan-glow);
    border-bottom-color: var(--cyan-glow);
    background-color: var(--cyan-bg);
}

.agenda-events-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.agenda-event-card {
    background-color: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    padding: 15px;
    display: flex;
    gap: 20px;
    transition: all var(--transition-speed);
}

.agenda-event-card:hover {
    border-color: var(--cyan-dim);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.08);
}

.agenda-event-time {
    font-family: var(--header-font);
    font-size: 15px;
    color: var(--cyan-glow);
    width: 130px;
    flex-shrink: 0;
    letter-spacing: 0.5px;
    border-right: 1px solid var(--panel-border);
}

.agenda-event-details {
    flex: 1;
}

.agenda-event-title {
    font-family: var(--header-font);
    font-size: 16px;
    letter-spacing: 1px;
    margin: 0 0 6px 0;
    color: var(--text-color);
}

.agenda-event-desc {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 8px;
    line-height: 1.4;
}

.agenda-event-location {
    font-size: 12px;
    color: var(--cyan-dim);
    font-family: var(--header-font);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* PROFILE PANEL VIEW */
#profile-panel {
    flex-direction: row;
    padding: 20px;
    gap: 20px;
    overflow-y: auto;
}

.profile-column-left {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-shrink: 0;
}

.profile-column-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    overflow: hidden;
}

.profile-card {
    background-color: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid var(--cyan-glow);
    box-shadow: 0 0 10px var(--cyan-dim);
    background-color: #0c1626;
    margin-bottom: 15px;
}

.profile-name {
    font-family: var(--header-font);
    font-size: 20px;
    letter-spacing: 1.5px;
    margin: 0 0 5px 0;
    color: var(--text-color);
}

.profile-title-select {
    background-color: #030812;
    border: 1px solid var(--panel-border);
    color: var(--cyan-glow);
    font-family: var(--header-font);
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.profile-credits-counter {
    background-color: #030812;
    border: 1px solid var(--cyan-dim);
    border-radius: 4px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.credits-icon {
    font-size: 18px;
    color: var(--yellow-alert);
    text-shadow: 0 0 6px var(--yellow-alert);
}

.credits-value {
    font-family: var(--header-font);
    font-size: 18px;
    color: var(--text-color);
    letter-spacing: 1px;
}

/* Faction Standings */
.faction-panel {
    background-color: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    padding: 15px;
}

.faction-panel-title {
    font-family: var(--header-font);
    font-size: 14px;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin: 0 0 15px 0;
    text-transform: uppercase;
}

.faction-standing-row {
    margin-bottom: 12px;
}

.faction-standing-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 4px;
    color: var(--text-color);
    text-transform: uppercase;
}

.faction-bar-bg {
    height: 8px;
    background-color: #030812;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #10233b;
}

.faction-bar-fill {
    height: 100%;
    border-radius: 4px;
}

.faction-bar-fill.re { background-color: var(--cyan-glow); box-shadow: 0 0 5px var(--cyan-glow); }
.faction-bar-fill.fo { background-color: var(--red-alert); box-shadow: 0 0 5px var(--red-alert); }
.faction-bar-fill.sm { background-color: var(--yellow-alert); box-shadow: 0 0 5px var(--yellow-alert); }

/* Inventory Items Area */
.profile-right-header {
    padding: 15px 20px;
    background-color: #060f1e;
    border-bottom: 1px solid var(--panel-border);
    font-family: var(--header-font);
    font-size: 16px;
    letter-spacing: 1px;
    color: var(--text-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inventory-grid {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
}

.inventory-item-card {
    background-color: #050d18;
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.inventory-item-card:hover {
    border-color: var(--cyan-glow);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.1);
}

.inventory-item-image {
    width: 64px;
    height: 64px;
    background-color: #091526;
    border: 1px solid #142f54;
    border-radius: 4px;
    object-fit: contain;
    margin-bottom: 8px;
    padding: 4px;
}

.inventory-item-name {
    font-family: var(--header-font);
    font-size: 12px;
    letter-spacing: 0.5px;
    margin: 0;
    color: var(--text-color);
    height: 32px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal dialog for item detail */
.item-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(2, 5, 10, 0.85);
    z-index: 100;
    display: none;
    justify-content: center;
    align-items: center;
}

.item-modal-content {
    background-color: var(--panel-bg);
    border: 2px solid var(--cyan-glow);
    border-radius: 8px;
    box-shadow: 0 0 25px var(--cyan-dim);
    width: 90%;
    max-width: 400px;
    padding: 20px;
    position: relative;
}

.item-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 20px;
    cursor: pointer;
}

.item-modal-close:hover {
    color: var(--cyan-glow);
}

.item-modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 10px;
}

.item-modal-image {
    width: 120px;
    height: 120px;
    background-color: #040b14;
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    object-fit: contain;
    padding: 10px;
    margin-bottom: 15px;
}

.item-modal-name {
    font-family: var(--header-font);
    font-size: 18px;
    color: var(--cyan-glow);
    margin: 0 0 10px 0;
    letter-spacing: 1px;
}

.item-modal-desc {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-dim);
    margin-bottom: 15px;
}

/* TOOLS PANEL VIEW */
#tools-panel {
    flex-direction: column;
    padding: 20px;
    gap: 20px;
    overflow-y: auto;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.tool-box {
    background-color: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tool-box-header {
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tool-box-title {
    font-family: var(--header-font);
    font-size: 15px;
    color: var(--cyan-glow);
    letter-spacing: 1px;
    margin: 0;
    text-transform: uppercase;
}

/* Aurebesh Translator Tool styling */
.translator-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.translator-input {
    background-color: #02050b;
    border: 1px solid var(--panel-border);
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 13px;
    width: 100%;
    resize: none;
    height: 60px;
}

.translator-input:focus {
    border-color: var(--cyan-glow);
    outline: none;
}

.translator-output-container {
    background-color: #02050b;
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    padding: 8px 12px;
    min-height: 60px;
    position: relative;
}

.translator-output-label {
    position: absolute;
    bottom: 4px;
    right: 8px;
    font-size: 9px;
    color: var(--text-dim);
}

.translator-output-text {
    font-size: 14px;
    word-break: break-all;
}

.translator-output-text.aurebesh {
    font-family: 'Aurebesh', sans-serif;
    letter-spacing: 1px;
    color: var(--cyan-glow);
}

/* Mock terminal hack tool */
.terminal-body {
    display: flex;
    flex-direction: column;
    background-color: #010307;
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    height: 180px;
    font-family: monospace;
    font-size: 11px;
    padding: 8px;
    color: #4af626;
    overflow: hidden;
}

.terminal-log {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.terminal-prompt-line {
    display: flex;
    align-items: center;
    border-top: 1px solid #142f54;
    padding-top: 4px;
    margin-top: 4px;
}

.terminal-prompt {
    margin-right: 5px;
    color: #4af626;
}

.terminal-input-el {
    background: none;
    border: none;
    color: #4af626;
    font-family: monospace;
    font-size: 11px;
    flex: 1;
}

.terminal-input-el:focus {
    outline: none;
}

/* Animations */
@keyframes pulse {
    0% { opacity: 0.5; box-shadow: 0 0 4px var(--cyan-glow); }
    100% { opacity: 1; box-shadow: 0 0 12px var(--cyan-glow), 0 0 20px var(--cyan-glow); }
}

@keyframes markerPulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 0.5; }
    100% { transform: scale(0.9); opacity: 0.8; }
}

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

@keyframes typing {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50% { transform: translateY(-4px); opacity: 1; }
}

/* RESPONSIVE LAYOUT FOR MOBILE */
@media (max-width: 768px) {
    #app-container {
        height: 100vh;
        max-height: 100vh;
        border: none;
        box-shadow: none;
    }

    #comms-panel {
        flex-direction: column;
    }

    #chat-back-btn {
        display: block !important;
    }

    #contacts-sidebar {
        width: 100%;
        height: 100%;
        border-right: none;
        display: flex;
    }

    /* Hide workspace on mobile unless a contact is active */
    #chat-workspace {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 10;
        display: none;
    }

    #chat-workspace.active-chat {
        display: flex;
    }

    #profile-panel {
        flex-direction: column;
    }

    .profile-column-left {
        width: 100%;
    }

    .chat-header-name {
        font-size: 16px;
    }

    .chat-mission-select {
        max-width: 140px;
        font-size: 12px;
    }
}

/* ==========================================================================
   EXCURSION SIMULATOR VIEW STYLES
   ========================================================================== */

#excursion-panel {
    background-color: var(--bg-dark);
    display: none;
    overflow-y: auto;
}

#excursion-panel.active {
    display: flex;
    flex-direction: column;
}

.excursion-container {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.excursion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 10px;
}

.excursion-glitch-title {
    font-family: var(--header-font);
    font-size: 20px;
    letter-spacing: 1.5px;
    color: var(--cyan-glow);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
    display: block;
}

.excursion-sub {
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 0.5px;
    display: block;
    margin-top: 2px;
}

.excursion-chapter-badge {
    background-color: var(--cyan-glow);
    color: #000;
    font-family: var(--header-font);
    font-size: 11px;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 1px;
}

.excursion-story-box {
    background-color: #020813;
    border: 1px solid var(--panel-border);
    padding: 20px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: inset 0 0 15px rgba(0, 240, 255, 0.03);
}

.excursion-location {
    font-size: 12px;
    color: var(--cyan-glow);
    font-weight: bold;
    font-family: var(--header-font);
    letter-spacing: 1px;
}

.excursion-description {
    line-height: 1.6;
    color: var(--text-light);
    font-size: 14px;
}

.excursion-choice-btn {
    background-color: #040e22;
    border: 1px solid var(--panel-border);
    color: var(--text-color);
    padding: 12px 15px;
    text-align: left;
    border-radius: 4px;
    font-size: 13.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.4;
    font-family: var(--body-font);
}

.excursion-choice-btn:hover:not(:disabled) {
    background-color: #07193b;
    border-color: var(--cyan-glow);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.2);
    color: var(--cyan-glow);
}

.excursion-choice-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #142f54;
}

