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

/* Character Header Bar */
.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;
}

/* Main Grid Layout */
.character-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
    margin-bottom: 20px;
}

/* Section Cards */
.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);
}

.section-content {
    padding: 15px 20px;
}

/* Image Card */
.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;
}

/* Aspects and Rankings Row Flex */
.aspects-rankings-row {
    display: flex;
    gap: 16px;
    align-items: stretch;
}

.aspects-card, .rankings-card {
    display: flex;
    flex-direction: column;
    min-height: 220px;
}

.aspects-card {
    flex: 1 1 0;
}

.rankings-card {
    background: rgba(30, 20, 40, 0.7);
    border: 1px solid rgba(255, 200, 255, 0.25);
    min-width: 180px;
    max-width: 270px;
    flex: 0 0 auto;
}

.rankings-content {
    font-size: 13px;
    color: #e0b3ff;
    line-height: 1.7;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.ranking-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2px;
}

.ranking-label {
    display: inline-block;
    min-width: 38px;
    padding: 2px 8px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid;
    background: transparent;
    box-shadow: none;
    text-align: center;
    transition: color 0.2s, border 0.2s;
    margin-right: 2px;
}

.ranking-label.e {
    color: #ff3c3c;
    border-color: #ff3c3c70;
    background: #ff3c3c15;
}

.ranking-label.d {
    color: #ff7b3c;
    border-color: #ff7b3c70;
    background: #ff7b3c15;
}

.ranking-label.c {
    color: #ffb23c;
    border-color: #ffb23c70;
    background: #ffb23c15;
}

.ranking-label.b {
    color: #baff3c;
    border-color: #baff3c70;
    background: #baff3c15;
}

.ranking-label.bplus {
    color: #3cffb2;
    border-color: #3cffb270;
    background: #3cffb215;
}

.ranking-label.a {
    color: #3ccaff;
    border-color: #3ccaff70;
    background: #3ccaff15;
}

.ranking-label.aplus {
    color: #3c7bff;
    border-color: #3c7bff70;
    background: #3c7bff15;
}

.ranking-label.aplusplus {
    color: #b3b3ff;
    border-color: #b3b3ff70;
    background: #b3b3ff15;
}

.ranking-label.ex {
    color: #fff;
    border-color: #fff7;
    background: #fff2;
}

.ranking-label.np {
    color: #ffd700;
    border-color: #ffd70070;
    background: #ffd70015;
}

.ranking-label.luck {
    color: #a5d6a7;
    border-color: #a5d6a740;
    background: #a5d6a715;
}

.ranking-skill-name {
    color: #aaa;
    font-size: 11px;
    font-style: italic;
    margin-left: 2px;
}

/* Aspects Section - Horizontal Layout */
.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-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 */
.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 */
.abilities-grid {
    display: grid;
    gap: 8px;
}

.spells-list {
    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 */
.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 */
.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 */
.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 & Mission */
.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 */
.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;
}

/* Missions */
.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: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.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 History Layout */
.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 */
.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;
}

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

.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 States */
.loading,
.empty-state {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 15px;
    font-size: 13px;
}

/* ===============================================
   Modal
   =============================================== */

.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; }
.account-menu {
    position: absolute;
    top: 60px;
    right: 30px;
    background: #22223a;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    padding: 18px 22px;
    min-width: 220px;
    z-index: 1100;
}
.account-menu.hidden { display: none; }
.account-info { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.account-avatar {
    width: 40px;
    height: 40px;
    background: #444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
}
.account-details { display: flex; flex-direction: column; }
.account-name { font-size: 18px; font-weight: bold; color: #fff; }
.account-rank { font-size: 13px; color: #b3e0ff; }
.logout-btn {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    border: none;
    background: linear-gradient(135deg, #e0b3ff, #ffb3d9, #b3e0ff);
    color: #22223a;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

/* Scrollbars */
::-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);
}

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

/* Mission Timeline */
.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 Button */
.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;
    }
    
    .nav-links {
        display: none;
    }
    
    .character-name {
        font-size: 24px;
        flex-direction: column;
        gap: 8px;
    }
    
    .character-name .name-prefix {
        font-size: 14px;
    }
}

/* Mage Info Badges */
.mage-info-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}