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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000000;
    color: #ffffff;
    min-height: 100vh;
}

.selector-group {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.selector-group label {
    font-weight: bold;
    color: var(--text-primary);
}

.selector-group select {
    flex: 1;
    max-width: 400px;
    padding: 10px;
    background: var(--background-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 5px;
    font-size: 16px;
}

.selector-group select option {
    background: var(--background-tertiary);
    color: var(--text-primary);
}

/* Navbar styles removed - using main.css instead */

.account-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.account-name {
    color: #00ffff;
    font-weight: bold;
    font-size: 16px;
}

.account-rank {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.logout-btn {
    width: 100%;
    padding: 10px;
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.5);
    color: #ff6666;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.logout-btn:hover {
    background: rgba(255, 0, 0, 0.3);
    border-color: #ff0000;
}

.character-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 80px 20px 40px 20px;
}

.character-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: rgba(20, 20, 40, 0.6);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 4px;
    margin-bottom: 20px;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.character-title {
    color: #00ffff;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.9;
}

.character-name {
    color: #ffffff;
    font-size: 32px;
    font-weight: 600;
    line-height: 1.2;
}

.character-tags-below {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 4px;
}

.character-tags-below .tag {
    background: rgba(0, 255, 255, 0.15);
    color: #00ffff;
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 11px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.character-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.character-code {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    font-family: 'Consolas', 'Monaco', monospace;
    text-transform: uppercase;
}

.character-owner {
    color: rgba(255, 255, 255, 0.4);
    font-size: 10px;
}

.character-status {
    color: #00ff88;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 6px 15px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 2px;
}

.character-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
    margin-bottom: 20px;
}

.section-card {
    background: rgba(20, 20, 40, 0.6);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.compact-card {
    margin-bottom: 10px;
}

.section-header {
    padding: 12px 20px;
    background: rgba(224, 179, 255, 0.05);
    border-bottom: 1px solid rgba(224, 179, 255, 0.2);
    background-image: linear-gradient(135deg, #e0b3ff, #ffb3d9, #b3e0ff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
    animation: marbleShift 8s ease infinite;
}

.section-header:hover {
    background-color: rgba(224, 179, 255, 0.1);
}

.collapse-icon {
    font-size: 12px;
    color: rgba(0, 255, 255, 0.7);
    transition: transform 0.3s ease;
}

.section-content {
    transition: all 0.3s ease;
    overflow: hidden;
}

.reset-view-btn {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: #00ffff;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    line-height: 1;
}

.reset-view-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    transform: rotate(180deg);
}

.image-card {
    margin-bottom: 15px;
}

.character-image {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.character-image img {
    width: 100%;
    height: auto;
    display: block;
}

.image-placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
}

.aspect-block {
    margin-bottom: 10px;
}

.aspect-label {
    color: rgba(0, 255, 255, 0.7);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    font-weight: 600;
}

.aspect-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.aspect-item {
    padding: 6px 12px;
    background: rgba(0, 255, 255, 0.05);
    border-left: 2px solid #00ffff;
    border-radius: 2px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    flex-shrink: 0;
}

.skills-pyramid,
.skills-compact {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    line-height: 1.6;
}

.skill-tier {
    margin-bottom: 6px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.skill-modifier {
    color: #00ffff;
    font-weight: 600;
    min-width: 30px;
    text-align: right;
    font-size: 11px;
}

.skill-modifier.positive {
    color: #00ff88;
}

.skill-modifier.negative {
    color: #ff6666;
}

.skill-names {
    color: rgba(255, 255, 255, 0.9);
    flex: 1;
    font-size: 11px;
    line-height: 1.4;
}

.skill-divider {
    margin: 10px 0;
    border: none;
    border-top: 1px solid rgba(0, 255, 255, 0.2);
}

.base-skills-label {
    color: rgba(0, 255, 255, 0.7);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    font-weight: 600;
}

.magic-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.magic-type-display {
    color: #ba7dff;
    font-weight: 600;
}

.mana-display-header {
    color: #ba7dff;
    font-size: 13px;
    font-weight: 600;
    background: rgba(138, 43, 226, 0.15);
    padding: 4px 12px;
    border-radius: 3px;
    border: 1px solid rgba(138, 43, 226, 0.3);
}

.spell-item {
    padding: 10px 12px;
    background: rgba(138, 43, 226, 0.05);
    border-left: 2px solid #ba7dff;
    border-radius: 2px;
    margin-bottom: 8px;
}

.spell-name {
    color: #ba7dff;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
}

.spell-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    line-height: 1.5;
}

.abilities-grid {
    display: grid;
    gap: 8px;
}

.ability-compact {
    padding: 10px 12px;
    border-left: 3px solid #00ffff;
    border-radius: 2px;
    background: rgba(0, 255, 255, 0.05);
}

.ability-compact.noble-phantasm {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.05);
}

.ability-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    gap: 8px;
}

.ability-name-compact {
    font-weight: 600;
    font-size: 13px;
    color: #00ffff;
    flex: 1;
}

.ability-compact.noble-phantasm .ability-name-compact {
    color: #ffd700;
}

.ability-type-badge-compact {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    opacity: 0.7;
    color: rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}

.ability-desc-compact {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    line-height: 1.5;
}

.items-list {
    display: grid;
    gap: 8px;
}

.item-compact {
    padding: 8px 12px;
    background: rgba(0, 255, 255, 0.05);
    border-left: 2px solid rgba(0, 255, 255, 0.5);
    border-radius: 2px;
}

.item-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.item-name-compact {
    color: #00ffff;
    font-weight: 600;
    font-size: 13px;
}

.item-qty {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
}

.item-size {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    margin-bottom: 4px;
}

.item-desc-compact {
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    line-height: 1.4;
}

.health-compact {
    font-size: 12px;
}

.threshold-display {
    padding: 8px 12px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 2px;
    margin-bottom: 10px;
    text-align: center;
}

.threshold-text {
    color: #00ff88;
    font-weight: 600;
}

.consequence-compact {
    padding: 6px 10px;
    background: rgba(255, 68, 68, 0.1);
    border-left: 2px solid #ff4444;
    border-radius: 2px;
    margin-bottom: 6px;
    font-size: 11px;
}

.consequence-compact.healed {
    background: rgba(0, 255, 136, 0.05);
    border-left-color: #00ff88;
    opacity: 0.5;
}

.consequence-name-compact {
    color: #ff6666;
    font-weight: 600;
}

.consequence-compact.healed .consequence-name-compact {
    color: #00ff88;
}

.body-part-compact {
    margin-bottom: 8px;
}

.body-part-header-compact {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
    font-size: 11px;
}

.body-part-name-compact {
    color: rgba(255, 255, 255, 0.8);
}

.body-part-health-compact {
    font-weight: 600;
    font-family: monospace;
}

.health-bar-compact {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 1px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.health-bar-fill-compact {
    height: 100%;
}

.resources-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.resource-item {
    padding: 8px 10px;
    background: rgba(0, 255, 255, 0.05);
    border-radius: 2px;
    text-align: center;
}

.resource-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.resource-value {
    color: #00ffff;
    font-weight: 600;
    font-size: 14px;
}

.location-globe {
    width: 100%;
    height: 200px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    margin-bottom: 12px;
    border: 1px solid rgba(0, 255, 255, 0.2);
    overflow: hidden;
    position: relative;
}

.location-globe canvas {
    width: 100% !important;
    height: 100% !important;
}

.location-globe .cesium-viewer {
    width: 100% !important;
    height: 100% !important;
}

.location-globe .cesium-widget {
    width: 100% !important;
    height: 100% !important;
}

.location-globe .cesium-widget-credits {
    display: none !important;
}

.location-globe .cesium-viewer-bottom {
    display: none !important;
}

.location-globe .cesium-viewer-toolbar {
    display: none !important;
}

.location-text,
.mission-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    line-height: 1.6;
}

.location-coords {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    font-family: monospace;
    margin-top: 4px;
}

.compact-btn {
    width: 100%;
    padding: 8px;
    margin-top: 10px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: #00ffff;
    border-radius: 2px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.compact-btn:hover {
    background: rgba(0, 255, 255, 0.2);
}

.bottom-sections {
    display: grid;
    gap: 15px;
}

.relationship-item-compact {
    padding: 12px;
    background: rgba(0, 255, 255, 0.05);
    border-left: 2px solid #00ffff;
    border-radius: 2px;
    margin-bottom: 10px;
}

.relationship-name {
    color: #00ffff;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.relationship-type {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    text-transform: uppercase;
}

.mission-item {
    padding: 16px;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.08) 0%, rgba(0, 180, 180, 0.05) 100%);
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid rgba(0, 255, 255, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mission-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--mission-color, #00ffff);
    box-shadow: 0 0 10px var(--mission-color, #00ffff);
}

.mission-item:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.12) 0%, rgba(0, 180, 180, 0.08) 100%);
    border-color: rgba(0, 255, 255, 0.25);
    transform: translateX(2px);
}

.mission-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
    position: relative;
}

.mission-name {
    color: #00ffff;
    font-weight: 700;
    font-size: 16px;
    flex: 1;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
    letter-spacing: 0.5px;
}

.mission-badges {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.mission-difficulty,
.mission-status,
.mission-role {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: 1px solid;
}

.mission-difficulty {
    border-color: var(--difficulty-color, #00ffff);
    background: linear-gradient(135deg, var(--difficulty-color-bg, rgba(0, 255, 255, 0.15)) 0%, transparent 100%);
    color: var(--difficulty-color, #00ffff);
    box-shadow: 0 0 10px var(--difficulty-color-glow, rgba(0, 255, 255, 0.2));
}

.mission-status {
    border-color: rgba(100, 255, 100, 0.5);
    background: rgba(100, 255, 100, 0.1);
    color: #64ff64;
}

.mission-role {
    border-color: rgba(255, 200, 100, 0.5);
    background: rgba(255, 200, 100, 0.1);
    color: #ffc864;
}

.mission-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 12px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    border-left: 2px solid rgba(0, 255, 255, 0.3);
}

.mission-objective {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    line-height: 1.5;
    margin-top: 8px;
    padding: 8px 10px;
    background: rgba(100, 200, 255, 0.08);
    border-radius: 4px;
    border-left: 2px solid rgba(100, 200, 255, 0.4);
}

.mission-objective strong {
    color: #64c8ff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.mission-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: 12px;
    flex-wrap: wrap;
}

.mission-reward {
    color: #ffd700;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mission-reward strong {
    color: #ffed4e;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mission-location {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.mission-deadline {
    color: rgba(255, 150, 100, 0.9);
    font-size: 11px;
    font-weight: 600;
}

.mission-details-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 400px;
    max-height: calc(100% - 40px);
    background: linear-gradient(135deg, rgba(10, 10, 20, 0.95) 0%, rgba(20, 20, 40, 0.95) 100%);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 255, 255, 0.2);
    overflow: hidden;
    z-index: 1000;
    transition: all 0.3s ease;
}

.mission-details-panel.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(20px);
}

.mission-panel-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.15) 0%, rgba(0, 180, 180, 0.1) 100%);
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mission-panel-header h3 {
    margin: 0;
    color: #00ffff;
    font-size: 18px;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.mission-panel-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.mission-panel-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ff5252;
}

.mission-panel-content {
    padding: 20px;
    max-height: calc(600px - 80px);
    overflow-y: auto;
}

.mission-panel-content::-webkit-scrollbar {
    width: 6px;
}

.mission-panel-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.mission-panel-content::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.3);
    border-radius: 3px;
}

.mission-panel-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 255, 0.5);
}

.mission-panel-content .mission-item {
    margin-bottom: 0;
    border: none;
}

.mission-history-list {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.mission-history-list::-webkit-scrollbar {
    width: 6px;
}

.mission-history-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.mission-history-list::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.3);
    border-radius: 3px;
}

.mission-history-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 255, 0.5);
}

.mission-history-map {
    position: relative;
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

.mission-completed-date {
    color: rgba(100, 255, 100, 0.8);
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.mission-unlocks {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 255, 255, 0.2);
}

.mission-unlocks-header {
    color: rgba(255, 200, 100, 0.9);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mission-unlocks-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.unlock-button {
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1) 0%, rgba(0, 180, 180, 0.05) 100%);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 4px;
    color: #00ffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.unlock-button:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(0, 180, 180, 0.1) 100%);
    border-color: rgba(0, 255, 255, 0.5);
    transform: translateX(4px);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.unlock-button.unlocked-completed {
    background: linear-gradient(135deg, rgba(100, 255, 100, 0.1) 0%, rgba(80, 200, 80, 0.05) 100%);
    border-color: rgba(100, 255, 100, 0.3);
    color: #64ff64;
}

.unlock-button.unlocked-completed:hover {
    background: linear-gradient(135deg, rgba(100, 255, 100, 0.15) 0%, rgba(80, 200, 80, 0.08) 100%);
    border-color: rgba(100, 255, 100, 0.5);
}

.unlock-button-locked {
    cursor: not-allowed;
    opacity: 0.5;
}

.unlock-button-locked:hover {
    transform: none;
    box-shadow: none;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1) 0%, rgba(0, 180, 180, 0.05) 100%);
    border-color: rgba(0, 255, 255, 0.3);
}

.mission-timeline {
    margin-top: 16px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(100, 150, 255, 0.2);
    border-radius: 6px;
}

.mission-timeline-header {
    color: rgba(150, 180, 255, 0.9);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mission-timeline-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.timeline-event {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(100, 150, 255, 0.05);
    border-left: 3px solid rgba(100, 150, 255, 0.5);
    border-radius: 3px;
}

.timeline-event-date {
    color: rgba(100, 200, 255, 1);
    font-size: 13px;
    font-weight: 600;
    min-width: 100px;
}

.timeline-event-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}

.mission-selector {
    padding: 0;
}

.mission-selector-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.15) 0%, rgba(0, 180, 180, 0.1) 100%);
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 700;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.mission-selector-count {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

.mission-selector-list {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mission-selector-item {
    padding: 12px;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.05) 0%, rgba(0, 180, 180, 0.02) 100%);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-left: 3px solid var(--mission-color, #00ffff);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.mission-selector-item:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.12) 0%, rgba(0, 180, 180, 0.08) 100%);
    border-color: rgba(0, 255, 255, 0.4);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mission-selector-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.mission-selector-item-name {
    color: #00ffff;
    font-size: 14px;
    font-weight: 600;
    flex: 1;
}

.mission-selector-item-objective {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    line-height: 1.4;
}

.loading,
.empty-state {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 15px;
    font-size: 13px;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: rgba(20, 20, 30, 0.95);
    border: 1px solid rgba(255, 179, 217, 0.3);
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid rgba(224, 179, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    background: linear-gradient(135deg, #e0b3ff, #ffb3d9, #b3e0ff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: marbleShift 8s ease infinite;
    font-size: 24px;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: #ffb3d9;
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px;
}

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

.form-input {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #444;
    background: #22223a;
    color: #fff;
    font-size: 16px;
}

.submit-btn {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: none;
    background: linear-gradient(135deg, #e0b3ff, #ffb3d9, #b3e0ff);
    color: #22223a;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

.form-footer { text-align: center; margin-top: 12px; font-size: 14px; color: #aaa; }

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 255, 0.5);
}

@media (max-width: 1200px) {
    .character-grid {
        grid-template-columns: 1fr;
    }
}

.timeline-container {
    position: relative;
    padding: 20px 0;
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 30px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 16px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    z-index: 2;
}

.timeline-line {
    position: absolute;
    left: 23px;
    top: 20px;
    bottom: -30px;
    width: 2px;
    background: linear-gradient(to bottom, rgba(0, 255, 255, 0.3), rgba(0, 255, 255, 0.1));
}

.timeline-content {
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid rgba(0, 255, 255, 0.5);
    border-radius: 6px;
    padding: 16px;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: translateX(4px);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}

.timeline-mission-name {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 6px;
}

.timeline-mission-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
}

.timeline-difficulty {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-location {
    color: rgba(255, 255, 255, 0.6);
}

.timeline-location::before {
    content: '📍';
    margin-right: 4px;
}

.timeline-status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    border: 1px solid;
}

.timeline-date {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.timeline-objective {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.edit-character-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 999;
    text-decoration: none;
    color: #ffffff;
}

.edit-character-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.edit-character-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.edit-character-btn svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

@media (max-width: 768px) {
    .edit-character-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    .edit-character-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .character-name {
        font-size: 24px;
        flex-direction: column;
        gap: 8px;
    }
    
    .character-name .name-prefix {
        font-size: 14px;
    }
}

:root {
    --background-primary: #0a0a14;
    --background-secondary: #14141e;
    --background-tertiary: #1a1a28;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-tertiary: #808080;
    --border-color: rgba(100, 100, 150, 0.3);
    --accent-color: #00ffff;
}

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

header {
    margin-bottom: 30px;
}

header h1 {
    text-align: center;
    margin-bottom: 5px;
    background: linear-gradient(135deg, #e0b3ff 0%, #ffb3d9 25%, #b3e0ff 50%, #ffffff 75%, #e0b3ff 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: marbleShift 8s ease infinite;
}

.header-tagline {
    text-align: center;
    font-size: 14px;
    font-weight: 300;
    background: linear-gradient(135deg, #c9a0e8 0%, #ffcce6 25%, #99d6ff 50%, #e6e6ff 75%, #c9a0e8 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    font-style: italic;
    text-transform: lowercase;
    margin-bottom: 20px;
    animation: marbleShift 8s ease infinite;
}

.tab-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.tab-button {
    padding: 10px 20px;
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    border-radius: 5px 5px 0 0;
    transition: all 0.3s ease;
}

.tab-button:hover {
    background: var(--background-tertiary);
}

.tab-button.active {
    background: linear-gradient(135deg, #e0b3ff, #ffb3d9, #b3e0ff);
    background-size: 200% 200%;
    color: white;
    border-bottom: 2px solid #e0b3ff;
    animation: marbleShift 8s ease infinite;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

.section {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    margin-top: 20px;
}

.section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #e0b3ff, #ffb3d9, #b3e0ff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border-bottom: 2px solid #e0b3ff;
    padding-bottom: 10px;
    animation: marbleShift 8s ease infinite;
}

.edit-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.form-group label {
    font-weight: bold;
    color: var(--text-secondary);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px;
    background: var(--background-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 5px;
    font-size: 16px;
    font-family: inherit;
}

.form-group select option {
    background: var(--background-tertiary);
    color: var(--text-primary);
}

.form-select {
    padding: 10px;
    background: var(--background-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 5px;
    font-size: 16px;
    font-family: inherit;
}

.form-select option {
    background: var(--background-tertiary);
    color: var(--text-primary);
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--border-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.checkbox-row {
    display: flex;
    gap: 20px;
    align-items: center;
}

.checkbox-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-primary);
}

.checkbox-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #e0b3ff, #ffb3d9, #b3e0ff);
    background-size: 200% 200%;
    color: white;
    animation: marbleShift 8s ease infinite;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(224, 179, 255, 0.4);
}

.btn-secondary {
    background: var(--background-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--background-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(100, 100, 150, 0.2);
}

.btn-danger {
    background: #ff4444;
    color: white;
}

.btn-danger:hover {
    background: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 68, 68, 0.3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.items-list:empty::before {
    content: "No items yet. Add one below.";
    color: var(--text-tertiary);
    font-style: italic;
}

.item-entry {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-entry:last-child {
    margin-bottom: 0;
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.item-details {
    color: var(--text-secondary);
    font-size: 14px;
}

.item-actions {
    display: flex;
    gap: 10px;
}

.item-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-edit {
    background: var(--accent-color);
    color: var(--background-primary);
}

.btn-edit:hover {
    background: #00cccc;
}

.btn-delete {
    background: #ff4444;
    color: white;
}

.btn-delete:hover {
    background: #cc0000;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 5px;
    font-weight: bold;
    z-index: 1000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.success {
    background: #44ff44;
    color: #003300;
}

.notification.error {
    background: #ff4444;
    color: white;
}

.notification.info {
    background: var(--accent-color);
    color: var(--background-primary);
}

.messages-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    height: 600px;
    margin-top: 20px;
}

.conversations-panel {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.conversations-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--accent-color);
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
}

.conversation-item {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}

.conversation-item:hover {
    background: rgba(0, 255, 255, 0.05);
}

.conversation-item.active {
    background: rgba(0, 255, 255, 0.1);
    border-left: 3px solid var(--accent-color);
}

.conversation-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.conversation-preview {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unread-badge {
    background: var(--accent-color);
    color: var(--background-primary);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: bold;
}

.no-conversations {
    padding: 20px;
    text-align: center;
    color: var(--text-tertiary);
}

.messages-panel {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.no-conversation {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-tertiary);
    font-size: 18px;
}

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

.conversation-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text-primary);
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 12px;
    animation: messageSlideIn 0.2s ease-out;
}

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

.message-own {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2), rgba(0, 150, 255, 0.2));
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.message-other {
    align-self: flex-start;
    background: var(--background-tertiary);
    border: 1px solid var(--border-color);
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 11px;
}

.message-sender {
    font-weight: 600;
    color: var(--accent-color);
}

.message-time {
    color: var(--text-tertiary);
}

.message-text {
    color: var(--text-primary);
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.no-messages {
    text-align: center;
    color: var(--text-tertiary);
    padding: 40px 20px;
}

.message-input-area {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

.message-input-area textarea {
    flex: 1;
    background: var(--background-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    font-family: inherit;
    font-size: 14px;
    resize: none;
}

.message-input-area textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.participants-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    background: var(--background-tertiary);
    border-radius: 6px;
}

.participant-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.participant-checkbox:hover {
    background: rgba(0, 255, 255, 0.05);
}

.participant-checkbox input {
    cursor: pointer;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.hero-card {
    display: flex;
    gap: 20px;
    background: #1a1a1a;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #333;
}

.portrait {
    width: 150px;
    height: 150px;
    background: url('../img/default.png') center/cover;
    border-radius: 12px;
    border: 2px solid #444;
}

.hero-info h1 {
    font-size: 2em;
    margin: 0;
}

.tabs {
    display: flex;
    margin-top: 20px;
    gap: 10px;
}

.tab-panel {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background: #1a1a1a;
    border-radius: 12px;
    border: 1px solid #333;
}

.tab-panel.active {
    display: block;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-box {
    background: #262626;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #383838;
}

.card-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card {
    background: #262626;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #383838;
}

.messages-header {
    margin-bottom: 30px;
}

.messages-header h1 {
    font-size: 36px;
    background: linear-gradient(135deg, #e0b3ff, #ffb3d9, #b3e0ff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: marbleShift 8s ease infinite;
    margin-bottom: 20px;
}

.character-selector {
    display: flex;
    align-items: center;
    gap: 15px;
}

.character-selector label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.character-selector select {
    background: rgba(20, 20, 30, 0.8);
    color: #ffffff;
    border: 1px solid rgba(224, 179, 255, 0.3);
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px;
    min-width: 300px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.character-selector select:hover {
    border-color: #e0b3ff;
}

.character-selector select:focus {
    outline: none;
    border-color: #ffb3d9;
    box-shadow: 0 0 10px rgba(255, 179, 217, 0.3);
}

.messaging-interface.hidden {
    display: none;
}

.conversation-view {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.conversation-view.hidden {
    display: none;
}

.messages-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.message-image {
    margin: 8px 0;
}

.message-image img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    border: 1px solid rgba(224, 179, 255, 0.2);
}

.message-text strong {
    font-weight: 700;
}

.message-text em {
    font-style: italic;
}

.message-text u {
    text-decoration: underline;
}

.message-text del {
    text-decoration: line-through;
    opacity: 0.7;
}

.message-text code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

.message-text pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 8px 0;
}

.message-text pre code {
    background: none;
    padding: 0;
}

.message-text .spoiler {
    background: rgba(0, 0, 0, 0.8);
    color: transparent;
    padding: 0 4px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
}

.message-text .spoiler:hover {
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

.input-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-icon {
    background: rgba(224, 179, 255, 0.1);
    border: 1px solid rgba(255, 179, 217, 0.3);
    color: #ffb3d9;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: #ffb3d9;
}

.input-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.image-preview {
    position: relative;
    max-width: 200px;
}

.image-preview.hidden {
    display: none;
}

.image-preview img {
    width: 100%;
    max-height: 100px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid rgba(255, 179, 217, 0.3);
}

.remove-image-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(238, 90, 111, 0.9);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: all 0.3s ease;
}

.remove-image-btn:hover {
    background: #ee5a6f;
    box-shadow: 0 0 10px rgba(238, 90, 111, 0.5);
}

.form-group input[type="text"],
.form-group input[type="checkbox"] {
    margin-right: 8px;
}

.form-group input[type="text"] {
    width: 100%;
    background: rgba(30, 30, 45, 0.8);
    color: #ffffff;
    border: 1px solid rgba(224, 179, 255, 0.2);
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: #ffb3d9;
    box-shadow: 0 0 10px rgba(255, 179, 217, 0.3);
}

.button-group .btn {
    flex: 1;
}

.loading {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 968px) {
    .messages-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .conversations-panel {
        height: 300px;
    }

    .message {
        max-width: 85%;
    }
}

#cesiumContainer {
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
}

.cesium-infoBox {
    background: rgba(0, 0, 0, 0.85) !important;
    border: 2px solid #00FFFF !important;
    border-radius: 8px !important;
    backdrop-filter: blur(10px);
}

.cesium-infoBox-title {
    background: rgba(0, 255, 255, 0.2) !important;
    color: #00FFFF !important;
    font-weight: bold !important;
    padding: 10px !important;
    border-bottom: 1px solid #00FFFF;
}

.cesium-infoBox-description {
    color: #FFFFFF !important;
    padding: 15px !important;
}

.cesium-infoBox-description h2 {
    color: #00FFFF;
    margin-top: 0;
}

.cesium-infoBox-description h3 {
    color: #00DDDD;
    margin-top: 15px;
}

.cesium-infoBox-description a {
    color: #00FFFF !important;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: bold;
}

.cesium-infoBox-description a:hover {
    color: #FF00FF !important;
    text-decoration: underline;
    text-shadow: 0 0 5px #FF00FF;
}

.cesium-infoBox-description ul {
    list-style: none;
    padding-left: 0;
}

.cesium-infoBox-description li {
    padding: 5px 0;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
}

.cesium-infoBox-description li:last-child {
    border-bottom: none;
}

.cesium-infoBox-close {
    color: #00FFFF !important;
}

.cesium-infoBox-close:hover {
    color: #FF00FF !important;
}

.cesium-widget-credits {
    display: none !important;
}

.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.5s ease;
}

.welcome-overlay.hidden {
    animation: fadeOut 0.5s ease forwards;
}

.welcome-content {
    text-align: center;
    color: white;
}

.welcome-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #00ffff;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.welcome-content p {
    font-size: 20px;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.8);
}

.explore-btn {
    padding: 15px 40px;
    font-size: 18px;
    background: linear-gradient(135deg, #00ffff, #0099ff);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 255, 255, 0.3);
}

.explore-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 255, 255, 0.5);
}

.info-panel {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(10, 10, 20, 0.85);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 10px;
    color: white;
    border: 1px solid rgba(0, 255, 255, 0.3);
    z-index: 1000;
    min-width: 200px;
}

.info-panel h3 {
    margin: 0 0 15px 0;
    color: #00ffff;
    font-size: 18px;
}

.info-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-panel li {
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.stats-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(10, 10, 20, 0.85);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    z-index: 1000;
    min-width: 250px;
    max-width: 350px;
    max-height: 400px;
    overflow-y: auto;
}

.character-locations {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.location-item {
    padding: 10px;
    background: rgba(0, 255, 255, 0.05);
    border-radius: 6px;
    border-left: 3px solid #00ffff;
}

.location-city {
    color: #00ffff;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
}

.location-characters {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.character-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 13px;
    padding: 2px 0;
    transition: color 0.2s ease;
}

.character-link:hover {
    color: #00ffff;
}

.stats-panel::-webkit-scrollbar {
    width: 6px;
}

.stats-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.stats-panel::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.5);
    border-radius: 10px;
}

.stats-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 255, 0.7);
}

.custom-info-panel {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 400px;
    max-height: 500px;
    background: rgba(10, 10, 20, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    border: 2px solid rgba(0, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: hidden;
    transition: all 0.3s ease;
}

.custom-info-panel.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(0, 153, 255, 0.1));
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
}

.info-header h2 {
    margin: 0;
    color: #00ffff;
    font-size: 24px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 32px;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
}

.close-btn:hover {
    color: #00ffff;
    transform: rotate(90deg);
}

.info-content {
    padding: 20px;
    color: rgba(255, 255, 255, 0.9);
    max-height: 400px;
    overflow-y: auto;
}

.info-content h3 {
    color: #00ffff;
    font-size: 18px;
    margin-top: 15px;
    margin-bottom: 10px;
}

.info-content p {
    margin: 8px 0;
    line-height: 1.6;
}

.info-content em {
    color: rgba(255, 255, 255, 0.6);
    font-style: normal;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

.info-content ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.info-content li {
    margin: 8px 0;
    padding-left: 20px;
    position: relative;
}

.info-content li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #00ffff;
}

.info-content a {
    color: #00ffff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-block;
    padding: 2px 0;
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
}

.info-content a:hover {
    color: #ff00ff;
    text-shadow: 0 0 8px rgba(255, 0, 255, 0.6);
    border-bottom-color: #ff00ff;
    transform: translateX(3px);
}

.info-content::-webkit-scrollbar {
    width: 6px;
}

.info-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.info-content::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.5);
    border-radius: 10px;
}

.info-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 255, 0.7);
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; visibility: hidden; }
}

.wiki-panel {
    position: fixed;
    top: 90px;
    left: 20px;
    width: 400px;
    max-height: calc(100vh - 120px);
    background: rgba(10, 10, 20, 0.95);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(0, 255, 255, 0.4);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 900;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wiki-panel.hidden {
    opacity: 0;
    transform: translateX(-100px);
    pointer-events: none;
}

.wiki-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.15), rgba(0, 153, 255, 0.15));
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
}

.wiki-header h3 {
    color: #00ffff;
    font-size: 20px;
    margin: 0;
}

.close-wiki-btn {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-wiki-btn:hover {
    color: #00ffff;
    background: rgba(0, 255, 255, 0.2);
    transform: rotate(90deg);
}

.wiki-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.wiki-tab {
    flex: 1;
    padding: 12px 8px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    border-bottom: 2px solid transparent;
}

.wiki-tab:hover {
    background: rgba(0, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
}

.wiki-tab.active {
    color: #00ffff;
    border-bottom-color: #00ffff;
    background: rgba(0, 255, 255, 0.1);
}

.wiki-search {
    padding: 15px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.wiki-content {
    padding: 15px;
    max-height: calc(100vh - 320px);
    overflow-y: auto;
}

.wiki-item {
    padding: 12px;
    background: rgba(0, 255, 255, 0.05);
    border-left: 3px solid #00ffff;
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wiki-item:hover {
    background: rgba(0, 255, 255, 0.1);
    transform: translateX(5px);
}

.wiki-item h4 {
    color: #00ffff;
    margin: 0 0 5px 0;
    font-size: 15px;
}

.wiki-item p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    margin: 0;
}

.mission-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 450px;
    max-height: 600px;
    background: rgba(10, 10, 20, 0.95);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(0, 255, 255, 0.4);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 900;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mission-panel.hidden {
    opacity: 0;
    transform: translateY(100px);
    pointer-events: none;
}

.mission-header h3 {
    color: #00ffff;
    font-size: 20px;
    margin: 0;
}

.close-mission-btn {
    position: absolute;
    right: 0;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-mission-btn:hover {
    color: #00ffff;
    background: rgba(0, 255, 255, 0.2);
    transform: rotate(90deg);
}

.mission-filters {
    display: flex;
    gap: 8px;
    padding: 15px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    padding: 6px 12px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

.filter-btn:hover,
.filter-btn.active {
    background: rgba(0, 255, 255, 0.3);
    border-color: #00ffff;
    color: #00ffff;
}

.mission-list {
    padding: 15px;
    max-height: 450px;
    overflow-y: auto;
}

.mission-card {
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-left: 4px solid #00ffff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mission-card:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: #00ffff;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.2);
}

.mission-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 8px;
}

.mission-card-title {
    color: #00ffff;
    font-size: 16px;
    font-weight: bold;
}

.mission-type-badge {
    background: rgba(0, 255, 255, 0.2);
    color: #00ffff;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.mission-card-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    margin-bottom: 10px;
    line-height: 1.5;
}

.mission-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0;
}

.mission-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

.mission-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

.mission-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 255, 255, 0.2);
}

.difficulty-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.difficulty-dot.filled {
    background: #00ffff;
    box-shadow: 0 0 5px #00ffff;
}

.quick-access {
    position: fixed;
    left: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 800;
}

.quick-btn {
    width: 50px;
    height: 50px;
    background: rgba(10, 10, 20, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 50%;
    color: #00ffff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: #00ffff;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 255, 255, 0.4);
}

.mission-detail-content {
    margin-bottom: 30px;
}

.mission-detail-content h3 {
    color: #00ffff;
    margin-bottom: 15px;
}

.mission-detail-content p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin-bottom: 15px;
}

.mission-detail-content ul {
    list-style: none;
    padding: 0;
}

.mission-detail-content li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: rgba(255, 255, 255, 0.8);
}

.mission-detail-content li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #00ffff;
}

.mission-deployment {
    border-top: 2px solid rgba(0, 255, 255, 0.3);
    padding-top: 20px;
}

.mission-deployment h3 {
    color: #00ffff;
    margin-bottom: 15px;
}

.deployment-hint {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    margin-bottom: 15px;
}

.deployment-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.deployment-slot {
    background: rgba(0, 255, 255, 0.05);
    border: 2px dashed rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Map Filter Tags */
.map-filters {
    position: fixed;
    top: 80px;
    left: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    background: rgba(10, 10, 20, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.filter-tag {
    padding: 10px 18px;
    background: rgba(30, 30, 45, 0.8);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-tag:hover {
    background: rgba(40, 40, 60, 0.9);
    border-color: rgba(0, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

.filter-tag.active {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2), rgba(224, 179, 255, 0.2));
    border-color: #00ffff;
    color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.filter-tag.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}