/* PenguinsIM - Universe Life Simulator Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 100%);
    color: #e0e0e0;
    overflow: hidden;
}

/* Screen Management */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

/* Loading Screen */
#loading-screen {
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a2e 100%);
}

.loading-content {
    text-align: center;
    max-width: 400px;
    padding: 2rem;
}

.loading-content h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    background: linear-gradient(45deg, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-bar {
    width: 100%;
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

#loading-progress {
    height: 100%;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    width: 0%;
    transition: width 0.3s ease;
}

#loading-text {
    color: #b0b0b0;
    font-size: 1rem;
}

/* Game Screen */
#game-screen {
    flex-direction: column;
}

.game-header {
    background: rgba(26, 26, 46, 0.9);
    padding: 1rem 2rem;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    gap: 2rem;
}

.game-header h1 {
    font-size: 1.5rem;
    background: linear-gradient(45deg, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex-shrink: 0;
}

.universe-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.universe-selector label {
    color: #b0b0b0;
    font-size: 0.9rem;
}

.universe-selector select {
    background: rgba(40, 40, 60, 0.8);
    border: 1px solid #4facfe;
    color: #e0e0e0;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    min-width: 150px;
}

.universe-selector select:focus {
    outline: none;
    border-color: #00f2fe;
    box-shadow: 0 0 5px rgba(79, 172, 254, 0.3);
}

.time-display, .player-info {
    font-size: 0.9rem;
    color: #b0b0b0;
    flex-shrink: 0;
}

.game-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* Navigation Panel */
.navigation-panel {
    width: 200px;
    background: rgba(20, 20, 35, 0.9);
    border-right: 1px solid #333;
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
}

.nav-btn {
    background: none;
    border: none;
    color: #b0b0b0;
    padding: 1rem 1.5rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.nav-btn:hover {
    background: rgba(79, 172, 254, 0.1);
    color: #4facfe;
}

.nav-btn.active {
    background: rgba(79, 172, 254, 0.2);
    color: #4facfe;
    border-right: 3px solid #4facfe;
}

/* Content Panels */
.content-panel {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    display: none;
    background: rgba(21, 21, 22,  1);
}

.content-panel.active {
    display: block;
}

/* Universe Explorer */
.universe-navigator {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    height: 100%;
}

.breadcrumb {
    grid-column: 1 / -1;
    background: rgb(26 26 28 / 80%);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #4facfe;
}

.universe-tree {
    background: rgb(26 26 28 / 80%);
    border-radius: 8px;
    padding: 1.5rem;
    overflow-y: auto;
    max-height: 70vh;
}

.tree-item {
    margin-left: 1rem;
    margin-bottom: 0.5rem;
}

.item-label {
    display: inline-block;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    user-select: none;
}

.item-label:hover {
    background: rgba(79, 172, 254, 0.1);
    color: #4facfe;
}

.tree-children {
    margin-left: 1rem;
    border-left: 1px solid #333;
    padding-left: 1rem;
}

.habitable-tag {
    background: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    margin-left: 0.5rem;
}

.selection-details {
    background: rgb(26 26 28 / 80%);
    border-radius: 8px;
    padding: 1.5rem;
}

.selection-details h3 {
    color: #4facfe;
    margin-bottom: 1rem;
}

#object-details {
    line-height: 1.6;
}

#object-details p {
    margin-bottom: 0.5rem;
}

#object-details button {
    background: linear-gradient(45deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 1rem;
    transition: transform 0.2s ease;
}

#object-details button:hover {
    transform: translateY(-1px);
}

/* 3D Visualization */
.visualization-container {
    background: rgb(36 36 38 / 80%);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    text-align: center;
}

.visualization-container h4 {
    color: #4facfe;
    margin-bottom: 1rem;
}

#planet-canvas {
    border: 2px solid rgba(79, 172, 254, 0.3);
    border-radius: 8px;
    background: #000;
    display: block;
    margin: 0 auto 1rem auto;
    max-width: 100%;
    height: auto;
}

.visualization-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.visualization-controls button {
    background: linear-gradient(45deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.visualization-controls button:hover {
    transform: translateY(-1px);
}

/* Character Panel */
.character-overview, .character-goals, .character-stats {
    background: rgb(26 26 28 / 80%);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.character-overview h3, .character-goals h3, .character-stats h3 {
    color: #4facfe;
    margin-bottom: 1rem;
}

.goal-category, .stat-category {
    margin-bottom: 1rem;
}

.goal-category h4, .stat-category h4 {
    color: #00f2fe;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.goal-category ul, .stat-category ul {
    list-style: none;
    padding-left: 1rem;
}

.goal-category li, .stat-category li {
    margin-bottom: 0.3rem;
    position: relative;
}

.goal-category li:before, .stat-category li:before {
    content: "▶";
    color: #4facfe;
    position: absolute;
    left: -1rem;
}

/* Debug Panel */
.debug-section {
    background: rgb(26 26 28 / 80%);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.debug-section h3 {
    color: #4facfe;
    margin-bottom: 1rem;
}

.debug-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-btn {
    background: linear-gradient(45deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.action-btn.secondary {
    background: linear-gradient(45deg, #6c757d 0%, #495057 100%);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 2rem;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid #333;
}

.modal-content h3 {
    color: #4facfe;
    margin-bottom: 1rem;
}

#character-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 1rem 0;
}

.character-option {
    background: rgb(26 26 28 / 80%);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.character-option:hover {
    background: rgba(79, 172, 254, 0.1);
    border-left: 4px solid #4facfe;
}

.character-option strong {
    color: #00f2fe;
}

.character-option p {
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
    color: #b0b0b0;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #00f2fe 0%, #4facfe 100%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .navigation-panel {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        padding: 0;
    }
    
    .nav-btn {
        white-space: nowrap;
        min-width: 120px;
    }
    
    .universe-navigator {
        grid-template-columns: 1fr;
    }
    
    .game-content {
        flex-direction: column;
    }
    
    .content-panel {
        padding: 1rem;
    }
    
    .debug-actions {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
}

/* Animation Classes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Special Effects */
.universe-item .item-label {
    background: linear-gradient(90deg, rgba(79, 172, 254, 0.1) 0%, rgba(0, 242, 254, 0.1) 100%);
}

.galaxy-item .item-label {
    background: linear-gradient(90deg, rgba(255, 107, 107, 0.1) 0%, rgba(255, 142, 83, 0.1) 100%);
}

.system-item .item-label {
    background: linear-gradient(90deg, rgba(255, 206, 84, 0.1) 0%, rgba(255, 238, 88, 0.1) 100%);
}

.planet-item .item-label {
    background: linear-gradient(90deg, rgba(34, 193, 195, 0.1) 0%, rgba(253, 187, 45, 0.1) 100%);
}

.moon-item .item-label {
    background: linear-gradient(90deg, rgba(165, 142, 251, 0.1) 0%, rgba(233, 191, 248, 0.1) 100%);
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.loading-content h1 {
    animation: pulse 2s infinite;
}

/* Gameplay UI */
.player-actions {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(79, 172, 254, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(79, 172, 254, 0.3);
}

.player-actions h4 {
    color: #4facfe;
    margin-bottom: 1rem;
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.action-btn {
    background: linear-gradient(45deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    color: white;
    padding: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4);
}

.action-btn:active {
    transform: translateY(0);
}

.action-result {
    padding: 0.5rem;
    background: rgba(0, 242, 254, 0.1);
    border-radius: 4px;
    color: #00f2fe;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    min-height: 1.5rem;
}

.time-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.time-btn {
    background: rgba(79, 172, 254, 0.2);
    border: 1px solid rgba(79, 172, 254, 0.4);
    color: #4facfe;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.time-btn:hover {
    background: rgba(79, 172, 254, 0.3);
}

.time-btn.active {
    background: linear-gradient(45deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border-color: transparent;
}

#game-day {
    color: #00f2fe;
    font-weight: 500;
    margin-left: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: rgba(0, 242, 254, 0.1);
    border-radius: 4px;
}

/* Enhanced Statistics Section */
.stats-controls {
    margin-bottom: 1rem;
}

.stats-selector {
    margin-bottom: 0.5rem;
}

.stats-selector label {
    display: inline-block;
    width: 80px;
    font-size: 0.85rem;
    color: #b0b0b0;
}

.stats-selector select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    width: 200px;
}

.stats-selector select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.stats-hint {
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

/* Enhanced Character Panel */
.character-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.1) 0%, rgba(0, 242, 254, 0.1) 100%);
    border-radius: 10px;
    border: 1px solid rgba(79, 172, 254, 0.3);
}

.character-avatar {
    flex-shrink: 0;
}

.portrait-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.character-identity {
    flex-grow: 1;
}

.character-identity h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: #4facfe;
}

.character-subtitle {
    color: #b0b0b0;
    margin-bottom: 0.25rem;
}

.character-location {
    color: #888;
    font-size: 0.85rem;
}

.character-status {
    flex-shrink: 0;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 255, 0, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00ff00;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    font-size: 0.85rem;
    color: #00ff00;
}

/* Character Stats Grid */
.character-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
}

.stat-card h4 {
    color: #4facfe;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.stat-bars {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-bar label {
    width: 80px;
    font-size: 0.85rem;
    color: #b0b0b0;
}

.progress-bar {
    flex-grow: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.stat-bar span {
    width: 40px;
    text-align: right;
    font-size: 0.85rem;
    color: #e0e0e0;
}

/* Personality Traits */
.personality-traits {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.trait-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.trait-label {
    font-size: 0.85rem;
    color: #b0b0b0;
}

.trait-indicator {
    width: 100px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    position: relative;
}

.trait-indicator::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b 0%, #feca57 50%, #48dbfb 100%);
    border-radius: 3px;
    width: var(--trait-value, 50%);
    transition: width 0.3s ease;
}

/* Additional styles for enhanced functionality */
.empty-state {
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

.unknown-data {
    color: #ff9f43;
    margin: 0.5rem 0;
}

.info-text {
    color: #74b9ff;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    margin: 1rem 0;
}

.stat-item {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.5rem 1rem;
    background: linear-gradient(45deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(79, 172, 254, 0.3);
}

.asset-item {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin-bottom: 0.5rem;
    border-left: 3px solid #4facfe;
}

/* Character Cards for Nearby Display */
.nearby-characters-header {
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(79, 172, 254, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(79, 172, 254, 0.3);
}

.nearby-characters-header h4 {
    color: #4facfe;
    margin-bottom: 0.5rem;
}

.location-info {
    color: #b0b0b0;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(79, 172, 254, 0.2);
}

.filter-controls label {
    color: #4facfe;
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-controls select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(79, 172, 254, 0.3);
    border-radius: 4px;
    color: #e0e0e0;
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-controls select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(79, 172, 254, 0.5);
}

.filter-controls select:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 2px rgba(79, 172, 254, 0.2);
}

.characters-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.character-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.character-card:hover {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.1) 0%, rgba(0, 242, 254, 0.1) 100%);
    border-color: rgba(79, 172, 254, 0.3);
    transform: translateY(-1px);
}

.character-info {
    flex-grow: 1;
}

.character-name {
    color: #4facfe;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.character-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.character-stats .stat {
    color: #b0b0b0;
    font-size: 0.85rem;
}

.compatibility-bar {
    position: relative;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.compatibility-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b 0%, #feca57 50%, #48dbfb 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.compatibility-text {
    position: absolute;
    top: -20px;
    right: 0;
    font-size: 0.75rem;
    color: #888;
}

.character-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.quick-action-btn {
    padding: 0.5rem 0.75rem;
    background: linear-gradient(45deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.quick-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(79, 172, 254, 0.3);
}

/* Social Network Characters */
.network-characters-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.network-character-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.network-character-item:hover {
    background: rgba(79, 172, 254, 0.1);
}

.character-summary {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.character-summary .character-name {
    color: #4facfe;
    font-size: 0.9rem;
    font-weight: 500;
}

.character-summary .character-age {
    color: #888;
    font-size: 0.8rem;
}

.compatibility-indicator {
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b 0%, #feca57 50%, #48dbfb 100%);
    border-radius: 2px;
    min-width: 60px;
    max-width: 100px;
}

/* Interaction Results */
.interaction-result {
    padding: 0.75rem;
    background: rgba(0, 242, 254, 0.1);
    border-left: 3px solid #00f2fe;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.interaction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.interaction-type {
    color: #00f2fe;
    font-weight: 500;
    text-transform: capitalize;
}

.interaction-time {
    color: #888;
    font-size: 0.8rem;
}

.interaction-details {
    color: #b0b0b0;
    font-size: 0.9rem;
}

/* Interaction Log */
.interaction-log {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.interaction-log-entry {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid #4facfe;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.log-time {
    color: #888;
    font-size: 0.8rem;
}

.log-type {
    color: #4facfe;
    font-weight: 500;
    text-transform: capitalize;
}

.log-content {
    color: #b0b0b0;
    line-height: 1.4;
}

/* Dialogue Modal */
.dialogue-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.dialogue-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid rgba(79, 172, 254, 0.3);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease;
}

.dialogue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(79, 172, 254, 0.2);
}

.dialogue-header h3 {
    color: #4facfe;
    margin: 0;
    font-size: 1.5rem;
}

.dialogue-close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.dialogue-close:hover {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.dialogue-message {
    color: #e0e0e0;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-style: italic;
}

.dialogue-action-results {
    background: linear-gradient(135deg, rgba(67, 206, 162, 0.1) 0%, rgba(24, 90, 157, 0.1) 100%);
    border: 1px solid rgba(67, 206, 162, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.dialogue-action-results h4 {
    color: #43cea2;
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.action-consequence {
    color: #b8f5d1;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
    border-left: 2px solid rgba(67, 206, 162, 0.4);
}

.action-consequence:last-child {
    margin-bottom: 0;
}

.dialogue-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.dialogue-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(45deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.dialogue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.dialogue-btn.primary {
    background: linear-gradient(45deg, #43cea2 0%, #185a9d 100%);
}

.dialogue-btn.primary:hover {
    box-shadow: 0 4px 15px rgba(67, 206, 162, 0.4);
}

.dialogue-btn.secondary {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
}

.dialogue-btn.secondary:hover {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.move-to-location-btn {
    padding: 0.4rem 0.8rem;
    background: linear-gradient(45deg, #f093fb 0%, #f5576c 100%);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0.5rem 0;
    width: 100%;
}

.move-to-location-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(240, 147, 251, 0.4);
}

.character-location-actions {
    margin: 0.5rem 0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        transform: translateY(-50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

/* Enhanced Character Cards for Diverse Interactions */
.character-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.interaction-category {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.category-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    font-weight: 500;
}

.interaction-group {
    display: flex;
    gap: 0.25rem;
}

.interaction-btn {
    padding: 0.4rem 0.6rem;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    min-width: 60px;
}

.interaction-btn.social {
    background: linear-gradient(45deg, #4facfe 0%, #00f2fe 100%);
}

.interaction-btn.economic {
    background: linear-gradient(45deg, #feca57 0%, #ff9ff3 100%);
}

.interaction-btn.survival {
    background: linear-gradient(45deg, #ff6b6b 0%, #ee5a24 100%);
}

.interaction-btn.romantic {
    background: linear-gradient(45deg, #ff9ff3 0%, #feca57 100%);
}

.interaction-btn.conflict {
    background: linear-gradient(45deg, #ff4757 0%, #c44569 100%);
}

.interaction-btn.community {
    background: linear-gradient(45deg, #5f27cd 0%, #00d2d3 100%);
}

.interaction-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.interaction-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Responsive adjustments for character cards */
@media (max-width: 768px) {
    .character-card {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .character-actions {
        justify-content: center;
    }
    
    .character-stats {
        justify-content: space-between;
    }
    
    .dialogue-content {
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* Skills Container */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
}

.skill-item {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    text-align: center;
}

.skill-name {
    font-size: 0.75rem;
    color: #b0b0b0;
    margin-bottom: 0.25rem;
}

.skill-value {
    font-size: 0.85rem;
    color: #4facfe;
    font-weight: 500;
}

/* Goals Section */
.character-goals-section {
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 1rem;
}

.character-goals-section h3 {
    color: #4facfe;
    margin-bottom: 1rem;
}

.goals-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.goal-tab {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #b0b0b0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.goal-tab:hover {
    background: rgba(79, 172, 254, 0.2);
    color: #e0e0e0;
}

.goal-tab.active {
    background: linear-gradient(45deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border-color: transparent;
}

.goals-content {
    min-height: 120px;
}

.goal-item {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    border-left: 4px solid #4facfe;
}

.goal-text {
    color: #e0e0e0;
    margin-bottom: 0.5rem;
}

.goal-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.goal-progress-bar {
    flex-grow: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.goal-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 2px;
}

.goal-status {
    color: #b0b0b0;
    font-size: 0.75rem;
}

/* Interactions Section */
.character-interactions-section {
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 1rem;
}

.character-interactions-section h3 {
    color: #4facfe;
    margin-bottom: 1rem;
}

.interaction-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.interaction-tab {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #b0b0b0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.interaction-tab:hover {
    background: rgba(79, 172, 254, 0.2);
    color: #e0e0e0;
}

.interaction-tab.active {
    background: linear-gradient(45deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border-color: transparent;
}

.interactions-content {
    min-height: 120px;
}

/* Assets Section */
.character-assets-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 1rem;
}

.character-assets-section h3 {
    color: #4facfe;
    margin-bottom: 1rem;
}

.assets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.asset-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 1rem;
}

.asset-card h4 {
    color: #00f2fe;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.asset-list {
    color: #b0b0b0;
    font-size: 0.85rem;
}

/* Interactions Panel */
.interactions-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.1) 0%, rgba(0, 242, 254, 0.1) 100%);
    border-radius: 10px;
    border: 1px solid rgba(79, 172, 254, 0.3);
}

.interactions-header h2 {
    color: #4facfe;
    margin-bottom: 0.5rem;
}

.interactions-subtitle {
    color: #b0b0b0;
    font-size: 1rem;
}

.quick-actions {
    margin-bottom: 2rem;
}

.quick-actions h3 {
    color: #4facfe;
    margin-bottom: 1rem;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.action-card:hover {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.1) 0%, rgba(0, 242, 254, 0.1) 100%);
    border-color: rgba(79, 172, 254, 0.3);
    transform: translateY(-2px);
}

.action-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.action-title {
    color: #4facfe;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.action-desc {
    color: #b0b0b0;
    font-size: 0.85rem;
}

.social-network, .active-interactions, .community-features {
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 1rem;
}

.social-network h3, .active-interactions h3, .community-features h3 {
    color: #4facfe;
    margin-bottom: 1rem;
}

.network-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.network-tab {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #b0b0b0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.network-tab:hover {
    background: rgba(79, 172, 254, 0.2);
    color: #e0e0e0;
}

.network-tab.active {
    background: linear-gradient(45deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border-color: transparent;
}

.network-content, .interaction-feed {
    min-height: 120px;
    color: #b0b0b0;
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.community-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 1rem;
}

.community-card h4 {
    color: #00f2fe;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.community-content {
    color: #b0b0b0;
    font-size: 0.85rem;
}

/* Buildings Panel */
.buildings-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.1) 0%, rgba(0, 242, 254, 0.1) 100%);
    border-radius: 10px;
    border: 1px solid rgba(79, 172, 254, 0.3);
}

.buildings-header h2 {
    color: #4facfe;
    margin-bottom: 0.5rem;
}

.buildings-subtitle {
    color: #b0b0b0;
    font-size: 1rem;
}

.construction-options, .owned-buildings, .construction-queue {
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 1rem;
}

.construction-options h3, .owned-buildings h3, .construction-queue h3 {
    color: #4facfe;
    margin-bottom: 1rem;
}

.building-categories {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.category-tab {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #b0b0b0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.category-tab:hover {
    background: rgba(79, 172, 254, 0.2);
    color: #e0e0e0;
}

.category-tab.active {
    background: linear-gradient(45deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border-color: transparent;
}

.building-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.building-option {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.building-option:hover {
    background: rgba(79, 172, 254, 0.1);
    border-color: rgba(79, 172, 254, 0.3);
}

.building-name {
    color: #4facfe;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.building-description {
    color: #b0b0b0;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.building-requirements {
    font-size: 0.75rem;
    color: #888;
}

.buildings-list, .queue-list {
    color: #b0b0b0;
    font-size: 0.85rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .character-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .action-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .character-header {
        flex-direction: column;
        text-align: center;
    }
    
    .goals-tabs, .interaction-tabs, .network-tabs, .building-categories {
        justify-content: center;
    }
    
    .assets-grid, .community-grid {
        grid-template-columns: 1fr;
    }
}

/* Population Panel Styles */
.population-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.1) 0%, rgba(0, 242, 254, 0.1) 100%);
    border-radius: 8px;
    border: 1px solid rgba(79, 172, 254, 0.2);
}

.population-header h2 {
    color: #4facfe;
    margin-bottom: 0.5rem;
}

.population-subtitle {
    color: #b0b0b0;
    font-size: 0.9rem;
}

.planet-stats-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card.large {
    grid-row: span 2;
}

.summary-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #4facfe;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #b0b0b0;
    font-size: 0.9rem;
}

.breakdown-chart {
    padding: 1rem 0;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-label {
    color: #e0e0e0;
}

.breakdown-value {
    color: #4facfe;
    font-weight: bold;
}

.settlements-section {
    margin-bottom: 2rem;
}

.settlements-filter {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.settlements-filter select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(79, 172, 254, 0.3);
    border-radius: 4px;
    color: #e0e0e0;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.settlements-filter select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(79, 172, 254, 0.5);
}

.settlements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.settlement-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.settlement-card:hover {
    border-color: rgba(79, 172, 254, 0.5);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.05) 100%);
}

.settlement-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #4facfe;
    margin-bottom: 0.5rem;
}

.settlement-type {
    display: inline-block;
    background: rgba(79, 172, 254, 0.2);
    color: #4facfe;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    text-transform: capitalize;
}

.settlement-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 1rem;
}

.settlement-stat {
    display: flex;
    justify-content: space-between;
    color: #b0b0b0;
    font-size: 0.9rem;
}

.settlement-stat-value {
    color: #e0e0e0;
    font-weight: bold;
}

.territory-section {
    margin-bottom: 2rem;
}

.territory-overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.territory-legend {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #e0e0e0;
}

.color-box {
    width: 16px;
    height: 16px;
    border-radius: 2px;
}

.color-box.claimed {
    background: #4facfe;
}

.color-box.government {
    background: #ff6b6b;
}

.color-box.settlement {
    background: #4ecdc4;
}

.color-box.unclaimed {
    background: #95e1d3;
}

.territory-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.territory-stat {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
}

.territory-stat span {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #4facfe;
    margin-bottom: 0.5rem;
}

.events-section {
    margin-bottom: 2rem;
}

.events-log {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
}

.event-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.event-item:last-child {
    border-bottom: none;
}

.event-description {
    color: #e0e0e0;
    flex: 1;
}

.event-time {
    color: #b0b0b0;
    font-size: 0.8rem;
    margin-left: 1rem;
}

.event-type {
    display: inline-block;
    background: rgba(79, 172, 254, 0.2);
    color: #4facfe;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-right: 1rem;
}