/* Pankosmion Game Styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--theme-background);
    font-family: 'Cinzel', serif;
}

/* Allow scrolling on profile and themes pages */
body.profile-page,
body.themes-page {
    overflow: auto;
}

/* Remove fixed height for profile and themes pages */
body.profile-page #gameContainer,
body.themes-page #gameContainer {
    height: auto;
}

/* CSS Custom Properties for Theme System */
:root {
    --theme-primary: #8B4513;
    --theme-secondary: #A0522D;
    --theme-accent: #FFD700;
    --theme-text: #D4AF37;
    --theme-background: #0a0a0a;
    --theme-surface: rgba(30, 30, 40, 0.9);
}

/* Global heading styles - ensure all h2 elements are theme-aware */
h2 {
    color: var(--theme-accent);
    font-family: 'Cinzel', serif;
}

#gameContainer {
    width: 100%;
    height: 100vh;
    position: relative;
}

.form-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(20, 20, 30, 0.95);
    border: 3px solid var(--theme-primary);
    border-radius: 15px;
    padding: 30px;
    color: var(--theme-text);
    box-shadow: 0 0 30px var(--theme-primary-50);
    z-index: 1000;
    min-width: 350px;
    display: none;
}

.form-container.active {
    display: block;
}

.form-container h2 {
    font-family: 'Uncial Antiqua', serif;
    text-align: center;
    margin-bottom: 20px;
    color: var(--theme-accent);
    text-shadow: 2px 2px 4px var(--theme-text-shadow);
}

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

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--theme-primary);
    border-radius: 5px;
    background: rgba(30, 30, 40, 0.9);
    color: var(--theme-text);
    font-family: 'Cinzel', serif;
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    border-color: var(--theme-accent);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.btn {
    background: linear-gradient(45deg, var(--theme-primary), var(--theme-secondary));
    color: var(--theme-accent);
    border: 2px solid var(--theme-primary);
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 100%;
    margin: 10px 0;
}

.btn:hover {
    background: linear-gradient(45deg, var(--theme-secondary), var(--theme-accent));
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.link-btn {
    background: none;
    border: none;
    color: #87CEEB;
    text-decoration: underline;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    margin: 5px 10px;
}

.link-btn:hover {
    color: var(--theme-accent);
}

.error-message {
    background: rgba(139, 0, 0, 0.8);
    color: #FFB6C1;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    border: 1px solid #8B0000;
    display: none; /* Hidden by default */
}

.success-message {
    background: rgba(0, 100, 0, 0.8);
    color: #90EE90;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    border: 1px solid #006400;
    display: none; /* Hidden by default */
}

.password-requirements {
    font-size: 12px;
    color: #87CEEB;
    margin-top: 5px;
    line-height: 1.4;
}

.game-title {
    font-family: 'Uncial Antiqua', serif;
    font-size: 4em;
    color: var(--theme-accent);
    text-align: center;
    text-shadow: 4px 4px 8px var(--theme-text-shadow);
    margin: 0;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from { text-shadow: 4px 4px 8px var(--theme-text-shadow), 0 0 20px var(--theme-accent-glow-30); }
    to { text-shadow: 4px 4px 8px var(--theme-text-shadow), 0 0 30px var(--theme-accent-glow-60); }
}

.continue-text {
    font-family: 'Cinzel', serif;
    font-size: 1.2em;
    color: var(--theme-text);
    text-align: center;
    margin-top: 30px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.welcome-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1000;
    display: none;
}

.welcome-container.active {
    display: block;
}

.welcome-container h1 {
    font-family: 'Uncial Antiqua', serif;
    font-size: 3em;
    color: var(--theme-accent);
    margin-bottom: 20px;
    text-shadow: 3px 3px 6px var(--theme-text-shadow);
}

.welcome-container p {
    font-size: 1.3em;
    color: var(--theme-text);
    margin-bottom: 30px;
}

/* Characters Screen Styles */
.characters-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 20, 0.95);
    color: var(--theme-text);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.characters-container.active {
    display: block;
}

.characters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: rgba(20, 20, 30, 0.9);
    border-bottom: 2px solid var(--theme-primary);
}

.characters-header h1 {
    font-family: 'Uncial Antiqua', serif;
    color: var(--theme-accent);
    margin: 0;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px var(--theme-text-shadow);
}

.logout-btn {
    background: none !important;
    border: 1px solid #87CEEB !important;
    padding: 8px 16px !important;
    border-radius: 5px !important;
    width: auto !important;
    margin: 0 !important;
}

.logout-btn:hover {
    background: rgba(135, 206, 235, 0.1) !important;
    box-shadow: none !important;
    transform: none !important;
}

.characters-layout {
    display: flex;
    height: calc(100vh - 100px);
    overflow: hidden;
}

/* Left Pane Styles */
.characters-left-pane {
    width: 350px;
    background: rgba(20, 20, 30, 0.95);
    border-right: 2px solid var(--theme-primary);
    padding: 20px;
    overflow-y: auto;
    box-sizing: border-box;
}

.characters-left-pane h2, .characters-left-pane h3 {
    font-family: 'Uncial Antiqua', serif;
    color: var(--theme-accent);
    margin-top: 0;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px var(--theme-text-shadow);
}

.characters-left-pane h2 {
    font-size: 1.8em;
    border-bottom: 1px solid var(--theme-primary);
    padding-bottom: 10px;
}

.characters-left-pane h3 {
    font-size: 1.3em;
    margin-top: 25px;
}

.character-creation-section {
    background: rgba(15, 15, 25, 0.8);
    border: 1px solid var(--theme-primary);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
}

.character-creation-section .input-group {
    margin-bottom: 15px;
}

.character-creation-section select {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--theme-primary);
    border-radius: 5px;
    background: rgba(30, 30, 40, 0.9);
    color: var(--theme-text);
    font-family: 'Cinzel', serif;
    box-sizing: border-box;
}

.character-creation-section select:focus {
    outline: none;
    border-color: var(--theme-accent);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.existing-characters-section {
    background: rgba(15, 15, 25, 0.8);
    border: 1px solid var(--theme-primary);
    border-radius: 10px;
    padding: 20px;
}

.characters-list {
    max-height: 300px;
    overflow-y: auto;
}

.character-item {
    background: rgba(30, 30, 40, 0.9);
    border: 1px solid var(--theme-primary);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.character-item:hover {
    background: rgba(40, 40, 50, 0.9);
    border-color: var(--theme-accent);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.character-item.selected {
    background: rgba(50, 50, 60, 0.9);
    border-color: var(--theme-accent);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.character-item-name {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--theme-accent);
    margin-bottom: 5px;
}

.character-item-details {
    font-size: 0.9em;
    color: var(--theme-text);
}

/* Center Pane Styles - Now Character Profile */
.characters-center-pane {
    min-width: 350px;
    max-width: 450px;
    width: auto;
    background: rgba(15, 15, 25, 0.95);
    border-right: 2px solid var(--theme-primary);
    padding: 20px;
    overflow-y: auto;
    box-sizing: border-box;
}

.character-model-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.no-model-message {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.model-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.model-icon {
    font-size: 6em;
    opacity: 0.3;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.model-placeholder p {
    font-size: 1.2em;
    color: var(--theme-primary);
    font-style: italic;
    margin: 0;
}

.character-model-display {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.model-viewport {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(30, 30, 40, 0.8), rgba(10, 10, 20, 0.9));
    border: 2px solid var(--theme-primary);
    border-radius: 15px;
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.character-avatar {
    text-align: center;
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

.avatar-icon {
    font-size: 8em;
    margin-bottom: 15px;
    text-shadow: 0 0 20px var(--theme-accent-glow-50);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 20px var(--theme-accent-glow-50); }
    to { text-shadow: 0 0 30px var(--theme-accent-glow-80), 0 0 40px var(--theme-accent-glow-30); }
}

.avatar-name {
    font-family: 'Uncial Antiqua', serif;
    font-size: 1.5em;
    color: var(--theme-accent);
    text-shadow: 2px 2px 4px var(--theme-text-shadow);
}

.model-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(20, 20, 30, 0.8);
    border: 1px solid var(--theme-primary);
    border-radius: 10px;
    padding: 15px;
}

.model-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.model-race {
    font-family: 'Uncial Antiqua', serif;
    font-size: 1.2em;
    color: var(--theme-accent);
    font-weight: 600;
}

.model-details {
    font-size: 0.9em;
    color: var(--theme-text);
}

.rotation-controls {
    display: flex;
    gap: 10px;
}

.model-btn {
    background: linear-gradient(45deg, var(--theme-primary), var(--theme-secondary));
    color: var(--theme-accent);
    border: 2px solid var(--theme-primary);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.model-btn:hover {
    background: linear-gradient(45deg, var(--theme-secondary), var(--theme-accent));
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
    transform: translateY(-1px);
}

.model-btn:active {
    transform: translateY(0);
}

.model-actions {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--theme-primary);
}

/* Right Pane Styles - Now Character Model */
.characters-right-pane {
    flex: 1;
    background: rgba(10, 10, 20, 0.95);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.character-profile h2 {
    font-family: 'Uncial Antiqua', serif;
    color: var(--theme-accent);
    font-size: 2em;
    margin-top: 0;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px var(--theme-text-shadow);
    border-bottom: 1px solid var(--theme-primary);
    padding-bottom: 10px;
}

.profile-section {
    background: rgba(20, 20, 30, 0.8);
    border: 1px solid var(--theme-primary);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.character-name {
    font-family: 'Uncial Antiqua', serif;
    color: var(--theme-accent);
    font-size: 1.8em;
    margin: 0;
    text-shadow: 1px 1px 2px var(--theme-text-shadow);
}

.currency-display {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2em;
}

.currency-icon {
    font-size: 1.5em;
}

.currency-label {
    color: var(--theme-text);
    font-weight: 600;
}

.currency-amount {
    color: var(--theme-accent);
    font-weight: 700;
}

.profile-section h4 {
    font-family: 'Uncial Antiqua', serif;
    color: var(--theme-accent);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.attribute-caps {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.attribute-cap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(30, 30, 40, 0.6);
    border: 1px solid var(--theme-primary);
    border-radius: 8px;
}

.attribute-cap label {
    font-weight: 600;
    color: var(--theme-text);
    font-size: 1.1em;
}

.cap-value {
    font-weight: 700;
    color: var(--theme-accent);
    font-size: 1.2em;
    text-shadow: 1px 1px 2px var(--theme-text-shadow);
}

.pandex-suit-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.suit-icon {
    font-size: 3em;
    cursor: pointer;
    transition: transform 0.2s ease;
    border: 2px solid var(--theme-primary);
    border-radius: 10px;
    padding: 10px;
    background: rgba(30, 30, 40, 0.8);
}

.suit-icon:hover {
    transform: scale(1.1);
    border-color: var(--theme-accent);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.suit-info {
    flex: 1;
}

.suit-name {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--theme-accent);
    margin-bottom: 8px;
}

.suit-capacity {
    margin-bottom: 8px;
}

.aurasyn-capacity {
    font-size: 1em;
    color: #87CEEB;
    font-weight: 600;
}

.aurasyn-capacity span {
    color: var(--theme-accent);
}

.suit-bonuses {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.9em;
}

.bonus-mind { color: #87CEEB; }
.bonus-body { color: #FF6347; }
.bonus-mojo { color: #FFA500; }

.profile-actions {
    text-align: center;
    margin-top: 20px;
}

.no-character-message {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.no-character-message p {
    font-size: 1.3em;
    color: var(--theme-primary);
    font-style: italic;
}

/* Mission Map Styles */
.mission-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(5, 5, 15, 0.98);
    color: var(--theme-text);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.mission-container.active {
    display: flex;
}

/* Mission Sidebar */
.mission-sidebar {
    width: 320px;
    background: rgba(20, 20, 30, 0.95);
    border-right: 2px solid var(--theme-primary);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.mission-sidebar.docked-right {
    order: 2;
    border-right: none;
    border-left: 2px solid var(--theme-primary);
}

.sidebar-header {
    padding: 8px 0px;
    background: rgba(30, 30, 40, 0.9);
    border-bottom: 1px solid var(--theme-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    min-height: 60px; /* Ensure adequate height for buttons */
}

.sidebar-header h2 {
    font-family: 'Uncial Antiqua', serif;
    color: var(--theme-accent);
    margin: 0;
    font-size: 1.2em; /* Reduced from 1.5em */
    flex: 1;
    text-align: center;
}

/* Dock button positioned based on sidebar location */
.dock-btn {
    background: var(--theme-primary-80);
    border: 1px solid var(--theme-primary);
    color: var(--theme-text);
    padding: 0px 6px 6px 6px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 2em; /* Doubled from 1em to 2em */
    transition: all 0.2s ease;
    position: absolute;
    line-height: 1;
}

.mission-sidebar:not(.docked-right) .dock-btn {
    right: 15px; /* Right side when sidebar is on left */
    top: 50%;
    transform: translateY(-50%);
}

.mission-sidebar.docked-right .dock-btn {
    left: 15px; /* Left side when sidebar is on right */
    top: 50%;
    transform: translateY(-50%);
}

.dock-btn:hover {
    background: var(--theme-primary-100);
    color: var(--theme-accent);
}


.mission-sidebar:not(.docked-right) .hamburger-menu {
    left: 15px; /* Left side when sidebar is on left */
    top: 50%;
    transform: translateY(-50%);
}

.mission-sidebar.docked-right .hamburger-menu {
    right: 15px; /* Right side when sidebar is on right */
    top: 50%;
    transform: translateY(-50%);
}


/* Dropdown menu for hamburger */
.hamburger-dropdown {
    position: absolute;
    top: 100%;
    background: rgba(30, 30, 40, 0.95);
    border: 1px solid var(--theme-primary);
    border-radius: 3px;
    padding: 5px 0;
    min-width: 150px;
    display: none;
    z-index: 20;
}

.mission-sidebar:not(.docked-right) .hamburger-dropdown {
    left: 0;
}

.mission-sidebar.docked-right .hamburger-dropdown {
    right: 0;
}

.hamburger-dropdown.show {
    display: block;
}

.hamburger-dropdown .btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 15px;
    margin: 0;
    background: transparent;
    border: none;
    color: var(--theme-text);
    cursor: pointer;
    transition: background 0.2s ease;
}

.hamburger-dropdown .btn:hover {
    background: var(--theme-primary-50);
    color: var(--theme-accent);
}

/* Info button styles removed - button no longer exists */

/* Info Modal */
.info-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.info-modal.show {
    display: flex;
}

.modal-content {
    width: 60%;
    height: 60%;
    background: rgba(20, 20, 30, 0.95);
    border: 3px solid var(--theme-primary);
    border-radius: 15px;
    box-shadow: 0 0 30px var(--theme-primary-50);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: rgba(30, 30, 40, 0.9);
    border-bottom: 2px solid var(--theme-primary);
}

.modal-header h3 {
    font-family: 'Uncial Antiqua', serif;
    color: var(--theme-accent);
    margin: 0;
    font-size: 1.5em;
    text-shadow: 2px 2px 4px var(--theme-text-shadow);
}

.modal-close {
    background: var(--theme-primary-80);
    border: 2px solid var(--theme-primary);
    color: var(--theme-text);
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.5em;
    font-weight: bold;
    transition: all 0.2s ease;
    line-height: 1;
}

.modal-close:hover {
    background: var(--theme-primary-100);
    color: var(--theme-accent);
    transform: scale(1.1);
}

.modal-body {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    color: var(--theme-text);
}

.modal-section {
    margin-bottom: 25px;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section h4 {
    color: var(--theme-accent);
    margin: 0 0 15px 0;
    font-size: 1.2em;
    border-bottom: 1px solid var(--theme-primary);
    padding-bottom: 8px;
    font-family: 'Uncial Antiqua', serif;
}

/* Inventory Modal */
.inventory-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.inventory-modal.show {
    display: flex;
}

.inventory-item-display {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 10px 0;
}

.item-icon {
    font-size: 4em;
    color: var(--theme-accent);
    text-shadow: 2px 2px 4px var(--theme-text-shadow);
    flex-shrink: 0;
    text-align: center;
    min-width: 100px;
}

.item-info {
    flex: 1;
}

.item-name {
    font-family: 'Uncial Antiqua', serif;
    font-size: 1.3em;
    color: var(--theme-accent);
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px var(--theme-text-shadow);
}

.item-description {
    color: var(--theme-text);
    line-height: 1.4;
    font-size: 1em;
}







.sidebar-navigation {
    border-top: 1px solid var(--theme-primary);
    padding: 15px 20px;
    background: rgba(30, 30, 40, 0.9);
}

.nav-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-buttons .btn {
    padding: 10px 15px;
    font-size: 0.9em;
    text-align: center;
}

/* Sidebar content styling */
.sidebar-content {
    padding: 15px;
    flex: 1;
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 20px;
    background: rgba(15, 15, 25, 0.8);
    border: 1px solid var(--theme-primary);
    border-radius: 8px;
    padding: 15px;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-section h3 {
    color: var(--theme-accent);
    margin: 0 0 12px 0;
    font-size: 1.1em;
    border-bottom: 1px solid var(--theme-primary);
    padding-bottom: 5px;
    font-family: 'Uncial Antiqua', serif;
}

/* Character Details Section */
.character-details-section {
    background: rgba(20, 20, 30, 0.9) !important;
}

.character-avatar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.character-avatar-thumbnail {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(30, 30, 40, 0.8);
    border: 2px solid var(--theme-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    color: var(--theme-accent);
    text-shadow: 1px 1px 2px var(--theme-text-shadow);
    flex-shrink: 0;
}

.character-name {
    font-family: 'Uncial Antiqua', serif;
    font-size: 1.2em;
    color: var(--theme-accent);
    text-shadow: 1px 1px 2px var(--theme-text-shadow);
    margin: 0;
}

.character-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dice-pool-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(30, 30, 40, 0.9);
    border: 1px solid var(--theme-primary);
    border-radius: 6px;
}

.dice-pool-display label {
    color: var(--theme-text);
    font-weight: 600;
    font-size: 0.9em;
    min-width: 70px;
}

.dice-pool-value {
    color: var(--theme-accent);
    font-weight: 700;
    font-size: 1.1em;
    font-family: 'Courier New', monospace;
    text-shadow: 1px 1px 2px var(--theme-text-shadow);
    min-width: 30px;
}

.dice-pool-level {
    color: #87CEEB;
    font-size: 0.8em;
    font-style: italic;
    opacity: 0.8;
}

.stat-meter {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
}

.stat-meter label {
    width: 35px;
    color: var(--theme-text);
    font-weight: 600;
    flex-shrink: 0;
}

.meter-bar {
    flex: 1;
    height: 12px;
    background: rgba(30, 30, 40, 0.8);
    border: 1px solid var(--theme-primary);
    border-radius: 6px;
    overflow: hidden;
    margin-left: 6px;
}

.meter-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.mind-meter {
    background: linear-gradient(90deg, #4169E1, #87CEEB);
}

.body-meter {
    background: linear-gradient(90deg, #DC143C, #FF6347);
}

.mojo-meter {
    background: linear-gradient(90deg, #FF8C00, #FFA500);
}

.stat-value {
    width: 60px;
    text-align: right;
    color: var(--theme-accent);
    font-weight: 600;
    font-size: 0.85em;
    flex-shrink: 0;
}

.aurasyn-meter {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    padding-top: 5px;
    border-top: 1px solid var(--theme-primary);
    margin-top: 5px;
}

.aurasyn-meter label {
    width: 70px;
    color: var(--theme-text);
    font-weight: 600;
    flex-shrink: 0;
}

.aurasyn-meter-fill {
    background: linear-gradient(90deg, #9370DB, #DDA0DD);
}



/* Inventory Section */
.inventory-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, 1fr);
    gap: 8px;
}

.inventory-slot {
    background: rgba(30, 30, 40, 0.8);
    border: 2px solid var(--theme-primary);
    border-radius: 6px;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.inventory-slot:hover {
    border-color: var(--theme-accent);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.slot-label {
    font-size: 0.8em;
    color: var(--theme-text);
    font-weight: 600;
    margin-bottom: 4px;
}

.slot-content {
    font-size: 1.2em;
    color: var(--theme-primary);
    font-weight: 700;
}

/* Hex Sections */
.hex-info {
    text-align: center;
    padding: 8px;
    background: rgba(30, 30, 40, 0.8);
    border: 1px solid var(--theme-primary);
    border-radius: 6px;
}

.hex-name {
    font-size: 1.2em;
    color: var(--theme-accent);
    font-weight: 700;
    font-family: 'Uncial Antiqua', serif;
}

/* Map area takes remaining space */
.map-area {
    flex: 1;
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

/* AP Counter (fixed position on map) */
.ap-counter {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
    background: rgba(20, 20, 30, 0.9);
    border: 2px solid var(--theme-primary);
    border-radius: 8px;
    padding: 15px 20px; /* Increased padding for larger text */
    cursor: default;
    transition: all 0.3s ease;
}

.ap-counter:hover {
    background: rgba(30, 30, 40, 0.95);
    border-color: var(--theme-accent);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.ap-label {
    color: var(--theme-text);
    font-weight: 600;
    font-size: 2.6em; /* Double the original size */
    font-family: 'Uncial Antiqua', serif;
    text-shadow: 1px 1px 2px var(--theme-text-shadow);
}

.ap-counter .ap-value {
    color: var(--theme-accent);
    font-weight: 700;
    font-size: 2.6em; /* Double the original size */
    font-family: 'Uncial Antiqua', serif;
    text-shadow: 1px 1px 2px var(--theme-text-shadow);
}

.ap-tooltip {
    position: absolute;
    top: 100%; /* Position below the counter */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: var(--theme-accent);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    margin-top: 5px; /* Changed from margin-bottom to margin-top */
    z-index: 101;
}

.ap-counter:hover .ap-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Map Address (fixed position on map) */
.map-address {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    background: rgba(20, 20, 30, 0.9);
    border: 2px solid var(--theme-primary);
    border-radius: 8px;
    padding: 15px 20px;
    cursor: default;
    transition: all 0.3s ease;
    min-width: 200px;
}

.map-address:hover {
    background: rgba(30, 30, 40, 0.95);
    border-color: var(--theme-accent);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.map-name-line {
    margin-bottom: 8px;
}

.map-name-label {
    color: var(--theme-text);
    font-weight: 600;
    font-size: 1.2em;
    font-family: 'Uncial Antiqua', serif;
    text-shadow: 1px 1px 2px var(--theme-text-shadow);
}

.map-name-value {
    color: var(--theme-accent);
    font-weight: 700;
    font-size: 1.2em;
    font-family: 'Uncial Antiqua', serif;
    text-shadow: 1px 1px 2px var(--theme-text-shadow);
}

.map-address-line {
    font-size: 0.9em;
}

.address-label {
    color: var(--theme-text);
    font-weight: 600;
    font-size: 1em;
    font-family: 'Cinzel', serif;
    text-shadow: 1px 1px 2px var(--theme-text-shadow);
}

.address-value {
    color: #87CEEB;
    font-weight: 600;
    font-size: 1em;
    font-family: 'Courier New', monospace; /* Monospace for address readability */
    text-shadow: 1px 1px 2px var(--theme-text-shadow);
}

.mission-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: rgba(20, 20, 30, 0.9);
    border-bottom: 2px solid var(--theme-primary);
}

.mission-header h1 {
    font-family: 'Uncial Antiqua', serif;
    color: var(--theme-accent);
    margin: 0;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px var(--theme-text-shadow);
}

.mission-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mission-character-name {
    font-family: 'Uncial Antiqua', serif;
    font-size: 1.3em;
    color: var(--theme-accent);
    text-shadow: 1px 1px 2px var(--theme-text-shadow);
}

.map-container {
    height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow: hidden;
}

.map-info {
    margin-bottom: 20px;
}

.map-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(20, 20, 30, 0.8);
    border: 1px solid var(--theme-primary);
    border-radius: 10px;
    padding: 15px 20px;
}

.map-size {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--theme-text);
}

.terrain-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9em;
    color: var(--theme-text);
    padding: 5px;
    border-radius: 3px;
    transition: background 0.2s ease;
}

.legend-item:hover {
    background: var(--theme-primary-20);
}

.terrain-sample {
    width: 16px;
    height: 16px;
    border: 1px solid var(--theme-primary);
    border-radius: 3px;
}

.terrain-sample.ground {
    background-color: #81c784;
}

.terrain-sample.impasse {
    background: repeating-linear-gradient(
        45deg,
        #ffb74d,
        #ffb74d 2px,
        #ffa726 2px,
        #ffa726 4px
    );
}

.terrain-sample.void {
    background: 
        repeating-linear-gradient(
            45deg,
            #ce93d8,
            #ce93d8 2px,
            transparent 2px,
            transparent 4px
        ),
        repeating-linear-gradient(
            -45deg,
            #ce93d8,
            #ce93d8 2px,
            transparent 2px,
            transparent 4px
        ),
        #ba68c8;
}

.hex-grid-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: rgba(10, 10, 20, 0.8);
    position: relative;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hex-grid-container:active {
    cursor: grabbing;
}

.hex-grid-viewport {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.hex-grid {
    display: inline-block;
    position: relative;
    transform-origin: 0 0;
    transition: transform 0.1s ease-out;
}

.hex-row {
    display: flex;
    align-items: center;
    margin-bottom: -26px; /* Proper vertical spacing for flat-top hex adjacency */
}

.hex-row-offset {
    margin-left: 45px; /* Shift Row B to the RIGHT by half a hex side beyond the hex spacing */
}

.hex {
    width: 60px;
    height: 52px;
    position: relative;
    margin-right: 30px; /* Half hex width - adjacent sides touch */
    cursor: pointer;
    transition: all 0.2s ease;
}

.hex-inner {
    width: 100%;
    height: 100%;
    position: relative;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.hex.ground .hex-inner {
    background-color: #4a5d23; /* Ground terrain */
    border: 2px solid #3a4d1a;
    box-sizing: border-box;
}

.hex.impasse .hex-inner {
    background: repeating-linear-gradient(
        45deg,
        #8B4513,
        #8B4513 2px,
        #A0522D 2px,
        #A0522D 4px
    ); /* Impasse terrain */
    border: 2px solid #654321;
    box-sizing: border-box;
}

.hex.void .hex-inner {
    background: 
        repeating-linear-gradient(
            45deg,
            #2c1810,
            #2c1810 2px,
            transparent 2px,
            transparent 4px
        ),
        repeating-linear-gradient(
            -45deg,
            #2c1810,
            #2c1810 2px,
            transparent 2px,
            transparent 4px
        ),
        #1a0e08; /* Void terrain */
    border: 2px solid #0f0704;
    box-sizing: border-box;
}

.hex:hover {
    transform: scale(1.1);
    z-index: 10;
}

.hex-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px; /* Doubled from 8px to 16px */
    font-weight: bold;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 2px var(--theme-text-shadow);
    z-index: 5;
    pointer-events: none;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.2s ease;
}

/* Show hex label on hover */
.hex:hover .hex-label {
    opacity: 1;
}

/* Show hex label for Next Hex */
.hex.next-hex .hex-label {
    opacity: 1;
    color: rgba(255, 215, 0, 1);
    text-shadow: 0 0 4px var(--theme-accent-glow-50);
}

/* Main Menu Styles */
.main-menu-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1000;
}

.main-menu {
    background: rgba(20, 20, 30, 0.95);
    border: 3px solid var(--theme-primary);
    border-radius: 15px;
    padding: 40px;
    color: var(--theme-text);
    box-shadow: 0 0 30px var(--theme-primary-50);
    min-width: 450px; /* Increased to accommodate button width */
    max-width: 500px;
    box-sizing: border-box;
}

.game-title {
    font-family: 'Uncial Antiqua', serif;
    font-size: 3em;
    color: var(--theme-accent);
    text-shadow: 3px 3px 6px var(--theme-text-shadow);
    /* Add glow effect */
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8)) 
            drop-shadow(0 0 40px rgba(255, 215, 0, 0.4));
    margin: 0 0 10px 0;
}

.game-subtitle {
    font-size: 1.2em;
    color: var(--theme-text);
    margin: 0 0 40px 0;
    font-style: italic;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.menu-btn {
    padding: 15px 20px; /* Reduced horizontal padding */
    font-size: 1.1em;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
    box-sizing: border-box;
    width: 100%; /* Ensure button fits within container */
    text-align: center;
}

.menu-btn.secondary {
    background: linear-gradient(45deg, #5a5a5a, #7a7a7a);
    border-color: #5a5a5a;
}

.menu-btn.secondary:hover {
    background: linear-gradient(45deg, #7a7a7a, #9a9a9a);
    box-shadow: 0 0 15px rgba(122, 122, 122, 0.4);
}

.user-info {
    font-size: 0.9em;
    color: #87CEEB;
}

.username {
    color: var(--theme-accent);
    font-weight: 600;
}

/* Characters Page Styles */
.characters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: rgba(20, 20, 30, 0.9);
    border-bottom: 2px solid var(--theme-primary);
    margin-bottom: 20px;
}

.characters-header h1 {
    font-family: 'Uncial Antiqua', serif;
    color: var(--theme-accent);
    margin: 0;
    font-size: 2em;
}

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

.header-actions .btn {
    padding: 10px 20px;
    font-size: 0.9em;
    margin: 0;
    white-space: nowrap; /* Prevent text wrapping */
    min-width: auto; /* Allow natural width based on content */
}

/* Hamburger Menu Styles */
.hamburger-menu {
    position: relative;
}

.hamburger-button {
    background: linear-gradient(45deg, var(--theme-primary), var(--theme-secondary));
    color: var(--theme-accent);
    border: 2px solid var(--theme-primary);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 2.9em;
}

.hamburger-button:hover {
    background: linear-gradient(45deg, var(--theme-secondary), var(--theme-accent));
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    transform: translateY(-1px);
}

.hamburger-button:active,
.hamburger-button.active {
    transform: translateY(0);
}

.hamburger-icon {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 2em;
    display: inline-block;
}

/* Hamburger Flyout */
.hamburger-flyout {
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background: var(--theme-surface);
    border: 2px solid var(--theme-primary);
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    margin-top: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.3s ease;
    font-size: 140%;
}

/* When sidebar is docked left, flyout should appear to the right */
.mission-sidebar:not(.docked-right) .hamburger-flyout {
    right: auto;
    left: 100%;
    margin-left: 4px;
    margin-top: 0;
}

/* When sidebar is docked right, move hamburger menu to right side */
.mission-sidebar.docked-right .hamburger-menu {
    position: absolute;
    right: 15px;
}

.hamburger-flyout.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Legacy Avatar Menu Styles (for compatibility) */
.avatar-menu {
    position: relative;
}

.avatar-button {
    background: linear-gradient(45deg, var(--theme-primary), var(--theme-secondary));
    color: var(--theme-accent);
    border: 2px solid var(--theme-primary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Cinzel', serif;
    font-size: 0.9em;
    font-weight: 600;
}

.avatar-button:hover {
    background: linear-gradient(45deg, var(--theme-secondary), var(--theme-accent));
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    transform: translateY(-1px);
}

.avatar-button:active {
    transform: translateY(0);
}

.avatar-icon {
    font-size: 1.8em;
}

/* Avatar Flyout */
.avatar-flyout {
    position: absolute;
    top: 100%;
    right: 0;
    width: 220px;
    background: var(--theme-surface);
    border: 2px solid var(--theme-primary);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.avatar-flyout.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.flyout-header {
    padding: 8px 12px;
    border-bottom: 1px solid var(--theme-primary-50);
    background: var(--theme-primary-20);
}

.flyout-username {
    color: var(--theme-accent);
    font-weight: 600;
    font-family: 'Cinzel', serif;
    font-size: 0.7em;
}

.flyout-menu {
    padding: 6px 0;
}

.flyout-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--theme-text);
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 0.7em;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: left;
}

.flyout-item:hover {
    background: var(--theme-primary-30);
    color: var(--theme-accent);
    transform: translateX(2px);
}

.flyout-icon {
    font-size: 0.9em;
    width: 16px;
    text-align: center;
}

.flyout-divider {
    height: 1px;
    background: var(--theme-primary-50);
    margin: 6px 12px;
}

.logout-item {
    color: #FF6B6B;
}

.logout-item:hover {
    background: rgba(255, 107, 107, 0.1);
    color: #FF8E8E;
}

/* Profile Page Styles */
.profile-container {
    background: rgba(10, 10, 20, 0.9);
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 10;
    overflow-y: auto;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--theme-primary);
}

.profile-header h1 {
    color: var(--theme-accent);
    font-family: 'Cinzel', serif;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px var(--theme-text-shadow);
    margin: 0;
}

.profile-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.profile-nav {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.nav-link {
    color: var(--theme-text);
    text-decoration: none;
    padding: 8px 16px;
    background: var(--theme-primary-30);
    border-radius: 6px;
    border: 1px solid var(--theme-primary);
    transition: all 0.2s ease;
    font-family: 'Cinzel', serif;
    font-size: 0.9em;
}

.nav-link:hover {
    background: var(--theme-primary-50);
    color: var(--theme-accent);
    transform: translateY(-1px);
}

.profile-main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.profile-section {
    background: rgba(30, 30, 40, 0.9);
    border: 2px solid var(--theme-primary);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.profile-section h2 {
    color: var(--theme-accent);
    font-family: 'Cinzel', serif;
    font-size: 1.8em;
    margin-bottom: 20px;
    text-shadow: 1px 1px 3px var(--theme-text-shadow);
}

.account-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--theme-primary-30);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item label {
    color: var(--theme-text);
    font-weight: 600;
    font-family: 'Cinzel', serif;
}

.info-item span {
    color: var(--theme-accent);
    font-weight: 500;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: var(--theme-text);
    font-weight: 600;
    font-family: 'Cinzel', serif;
    font-size: 1em;
}

.form-group input {
    background: rgba(20, 20, 30, 0.9);
    border: 2px solid var(--theme-primary);
    border-radius: 6px;
    padding: 12px 15px;
    color: var(--theme-accent);
    font-family: 'Cinzel', serif;
    font-size: 1em;
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--theme-text);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.form-group input:read-only {
    background: rgba(10, 10, 15, 0.7);
    color: var(--theme-text);
    cursor: not-allowed;
}

.form-help {
    color: var(--theme-text);
    font-size: 0.85em;
    font-style: italic;
}

.profile-form .btn {
    align-self: flex-start;
    margin-top: 10px;
}

.flyout-item.active {
    background: var(--theme-primary-40);
    color: var(--theme-accent);
}

/* Responsive design for profile page */
@media (max-width: 768px) {
    .profile-container {
        padding: 15px;
    }
    
    .profile-header h1 {
        font-size: 2em;
    }
    
    .profile-nav {
        flex-direction: column;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Themes Page Styles */
.themes-container {
    background: rgba(10, 10, 20, 0.9);
    padding: 20px;
    position: relative;
    z-index: 10;
    overflow-y: auto;
}

.themes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--theme-primary);
}

.themes-title h1 {
    color: var(--theme-accent);
    font-family: 'Cinzel', serif;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px var(--theme-text-shadow);
    margin: 0 0 10px 0;
}

.themes-title p {
    color: var(--theme-text);
    font-size: 1.1em;
    margin: 0;
    opacity: 0.9;
}

.themes-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}


.themes-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.themes-nav {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.themes-main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.themes-intro {
    text-align: center;
    margin-bottom: 20px;
}

.themes-intro h2 {
    color: var(--theme-accent);
    font-family: 'Cinzel', serif;
    font-size: 2em;
    margin-bottom: 10px;
}

.themes-intro p {
    color: var(--theme-text);
    font-size: 1.1em;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.current-theme-section {
    background: var(--theme-surface);
    border: 2px solid var(--theme-primary);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    max-width: 400px;
    margin: 0 auto 30px auto;
}

.current-theme-section h2 {
    color: var(--theme-accent);
    font-family: 'Cinzel', serif;
    font-size: 1.8em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px var(--theme-text-shadow);
}

.current-theme-section h3 {
    color: var(--theme-accent);
    font-family: 'Cinzel', serif;
    font-size: 1.5em;
    margin-bottom: 20px;
}

.current-theme-display {
    display: flex;
    justify-content: center;
}

.themes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.theme-card {
    background: var(--theme-surface);
    border: 2px solid var(--theme-primary);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.theme-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: var(--theme-accent);
}

.theme-header {
    text-align: center;
    margin-bottom: 15px;
}

.theme-header h3 {
    color: var(--theme-accent);
    font-family: 'Cinzel', serif;
    font-size: 1.3em;
    margin: 0;
}

.theme-name {
    color: var(--theme-accent);
    font-family: 'Cinzel', serif;
    font-size: 1.2em;
    font-weight: 600;
    text-align: center;
    margin-bottom: 10px;
}

.theme-colors {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

.color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.2s ease;
}

.color-swatch:hover {
    transform: scale(1.1);
}

.theme-demo {
    margin-bottom: 15px;
}

.demo-content {
    padding: 15px;
    border-radius: 6px;
    text-align: center;
}

.demo-text {
    margin-bottom: 10px;
    font-size: 0.9em;
}

.demo-button {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
    display: inline-block;
}

.theme-preview {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.theme-preview.active {
    box-shadow: 0 0 15px var(--theme-accent-glow-30);
}

.theme-sample {
    padding: 15px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sample-header {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 1.1em;
    padding: 8px 12px;
    border-radius: 4px;
}

.sample-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.sample-text {
    font-size: 0.9em;
    opacity: 0.9;
}

.sample-button {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sample-accent {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    text-align: center;
    font-weight: 500;
}

/* Theme-specific preview styles */
.classic-preview .theme-sample {
    background: rgba(30, 30, 40, 0.9);
    color: var(--theme-text);
}

.classic-preview .sample-header {
    background: #8B4513;
    color: var(--theme-accent);
}

.classic-preview .sample-button {
    background: #A0522D;
    color: var(--theme-accent);
}

.classic-preview .sample-accent {
    background: #FFD700;
    color: var(--theme-primary);
}

.ocean-preview .theme-sample {
    background: rgba(20, 40, 60, 0.9);
    color: #F1FAEE;
}

.ocean-preview .sample-header {
    background: #1B4F72;
    color: #A8DADC;
}

.ocean-preview .sample-button {
    background: #2E86AB;
    color: #A8DADC;
}

.ocean-preview .sample-accent {
    background: #A8DADC;
    color: #1B4F72;
}

.forest-preview .theme-sample {
    background: rgba(30, 45, 25, 0.9);
    color: #DDDDDD;
}

.forest-preview .sample-header {
    background: #2D5016;
    color: #91C788;
}

.forest-preview .sample-button {
    background: #52734D;
    color: #91C788;
}

.forest-preview .sample-accent {
    background: #91C788;
    color: #2D5016;
}

.twilight-preview .theme-sample {
    background: rgba(40, 20, 50, 0.9);
    color: #F3E5F5;
}

.twilight-preview .sample-header {
    background: #4A148C;
    color: #E1BEE7;
}

.twilight-preview .sample-button {
    background: #7B1FA2;
    color: #E1BEE7;
}

.twilight-preview .sample-accent {
    background: #E1BEE7;
    color: #4A148C;
}

.ember-preview .theme-sample {
    background: rgba(50, 20, 20, 0.9);
    color: #FFCCBC;
}

.ember-preview .sample-header {
    background: #B71C1C;
    color: #FFAB91;
}

.ember-preview .sample-button {
    background: #D84315;
    color: #FFAB91;
}

.ember-preview .sample-accent {
    background: #FFAB91;
    color: #B71C1C;
}

.arctic-preview .theme-sample {
    background: rgba(30, 35, 40, 0.9);
    color: #ECEFF1;
}

.arctic-preview .sample-header {
    background: #263238;
    color: #B0BEC5;
}

.arctic-preview .sample-button {
    background: #455A64;
    color: #B0BEC5;
}

.arctic-preview .sample-accent {
    background: #B0BEC5;
    color: #263238;
}

.theme-info {
    text-align: center;
}

.theme-info h4 {
    color: var(--theme-accent);
    font-family: 'Cinzel', serif;
    font-size: 1.3em;
    margin-bottom: 8px;
}

.theme-info p {
    color: var(--theme-text);
    margin-bottom: 15px;
    font-size: 0.9em;
    opacity: 0.9;
}

.theme-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-preview,
.btn-apply {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9em;
}

.btn-preview {
    background: var(--theme-primary-30);
    color: var(--theme-text);
    border: 1px solid var(--theme-primary);
}

.btn-preview:hover {
    background: var(--theme-primary-50);
    color: var(--theme-accent);
}

.btn-apply {
    background: linear-gradient(45deg, var(--theme-primary), var(--theme-secondary));
    color: var(--theme-accent);
    border: 2px solid var(--theme-primary);
}

.btn-apply:hover {
    background: linear-gradient(45deg, var(--theme-secondary), var(--theme-accent));
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.theme-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.theme-status {
    padding: 10px 20px;
    border-radius: 6px;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    text-align: center;
    min-width: 200px;
}

.theme-status.current {
    background: var(--theme-primary-30);
    color: var(--theme-text);
    border: 1px solid var(--theme-primary);
}

.theme-status.preview {
    background: rgba(255, 215, 0, 0.2);
    color: var(--theme-accent);
    border: 1px solid var(--theme-accent);
}

.theme-status.success {
    background: rgba(76, 175, 80, 0.2);
    color: #81C784;
    border: 1px solid #4CAF50;
}

.theme-status.error {
    background: rgba(244, 67, 54, 0.2);
    color: #E57373;
    border: 1px solid #F44336;
}

/* Responsive design for themes page */
@media (max-width: 1024px) {
    .themes-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
    }
}

@media (max-width: 768px) {
    .themes-container {
        padding: 15px;
    }
    
    .themes-header h1 {
        font-size: 2em;
    }
    
    .themes-nav {
        flex-direction: column;
    }
    
    .themes-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    
    .theme-actions {
        flex-direction: column;
    }
    
    .theme-controls {
        flex-direction: column;
        gap: 15px;
    }
}

/* Character sorting controls */
.character-sort-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(30, 30, 40, 0.8);
    border-radius: 5px;
}

.character-sort-controls label {
    color: var(--theme-text);
    font-size: 0.9em;
    margin-right: 5px;
}

.character-sort-controls select {
    padding: 5px 10px;
    border: 1px solid var(--theme-primary);
    border-radius: 3px;
    background: rgba(30, 30, 40, 0.9);
    color: var(--theme-text);
    font-family: 'Cinzel', serif;
    font-size: 0.9em;
}

/* Character model styling */
.character-avatar {
    font-size: 4em; /* Increased from default */
    text-align: center;
    padding: 20px;
    background: rgba(30, 30, 40, 0.8);
    border-radius: 10px;
    margin-bottom: 15px;
}

.model-controls {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.model-controls .btn.small {
    padding: 5px 10px; /* Much smaller rotate buttons */
    font-size: 0.8em;
    min-width: auto;
}

/* Pandex suit bonuses */
.suit-bonuses {
    margin-top: 10px;
    font-size: 0.9em;
    color: #87CEEB;
}

.suit-bonuses div {
    margin: 2px 0;
}