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

body {
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', sans-serif;
    background: linear-gradient(135deg, #001133 0%, #003366 100%);
    min-height: 100vh;
    overflow: hidden;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #001133 0%, #003366 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    color: #fff;
}

.loading-content h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.loading-bar-container {
    width: 400px;
    height: 30px;
    background: #003366;
    border: 2px solid #0099CC;
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto 1rem;
}

.loading-bar {
    height: 100%;
    background: linear-gradient(90deg, #0099CC 0%, #00CCFF 100%);
    width: 0%;
    transition: width 0.3s ease;
}

#loadingText {
    font-size: 1rem;
    color: #00CCFF;
}

/* Window Frame */
#app-container {
    padding: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

.window-frame {
    background: #d4d0c8;
    border: 2px solid #fff;
    box-shadow: 
        inset -1px -1px 0 #000,
        inset 1px 1px 0 #fff,
        inset -2px -2px 0 #808080,
        inset 2px 2px 0 #dfdfdf,
        0 4px 20px rgba(0, 0, 0, 0.5);
    border-radius: 3px;
}

/* Title Bar */
.title-bar {
    background: linear-gradient(180deg, #0A246A 0%, #001153 100%);
    padding: 3px 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #000;
}

.title-text {
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.window-controls {
    display: flex;
    gap: 2px;
}

.control-btn {
    width: 16px;
    height: 14px;
    background: #c0c0c0;
    border: 1px solid #fff;
    border-bottom-color: #000;
    border-right-color: #000;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:active {
    border: 1px solid #000;
    border-top-color: #808080;
    border-left-color: #808080;
}

/* Menu Bar */
.menu-bar {
    background: #d4d0c8;
    padding: 2px 5px;
    border-bottom: 1px solid #808080;
    display: flex;
    gap: 10px;
}

.menu-item {
    padding: 2px 8px;
    cursor: pointer;
    font-size: 11px;
}

.menu-item:hover {
    background: #0A246A;
    color: #fff;
}

/* Main Content */
.main-content {
    display: flex;
    background: #000;
    min-height: 600px;
}

/* Sidebar Left */
.sidebar-left {
    width: 220px;
    background: linear-gradient(180deg, #003366 0%, #001a33 100%);
    border-right: 2px solid #0099CC;
    overflow-y: auto;
    padding: 5px;
}

.menu-section {
    margin-bottom: 2px;
    cursor: pointer;
}

.menu-header {
    background: linear-gradient(180deg, #0066AA 0%, #003366 100%);
    color: #fff;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: bold;
    border: 1px solid #0099CC;
    border-radius: 2px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    transition: all 0.2s;
}

.menu-section:hover .menu-header {
    background: linear-gradient(180deg, #0088CC 0%, #0055AA 100%);
}

.menu-section.active .menu-header {
    background: linear-gradient(180deg, #FF9933 0%, #CC6600 100%);
    border-color: #FFB366;
}

.search-section {
    cursor: default;
}

.search-input {
    width: 100%;
    padding: 5px;
    margin-top: 5px;
    background: #e0e0e0;
    border: 2px inset #808080;
    font-size: 11px;
}

.search-results {
    margin-top: 5px;
    max-height: 200px;
    overflow-y: auto;
    background: #e0e0e0;
    border: 1px solid #808080;
}

.search-result-item {
    padding: 5px;
    cursor: pointer;
    font-size: 11px;
    border-bottom: 1px solid #c0c0c0;
}

.search-result-item:hover {
    background: #0A246A;
    color: #fff;
}

/* Globe Container */
.globe-container {
    flex: 1;
    position: relative;
    background: #000;
}

#scene-container {
    width: 100%;
    height: 100%;
}

.info-overlay {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #00CCFF;
    padding: 5px 10px;
    font-size: 11px;
    border: 1px solid #0099CC;
    border-radius: 2px;
    font-family: monospace;
}

/* Sidebar Right (Info Panel) */
.sidebar-right {
    width: 300px;
    background: linear-gradient(180deg, #003366 0%, #001a33 100%);
    border-left: 2px solid #0099CC;
    overflow-y: auto;
    padding: 10px;
}

.info-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.info-panel-header h3 {
    color: #FFB366;
    font-size: 16px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.close-btn {
    width: 20px;
    height: 20px;
    background: #c0c0c0;
    border: 1px solid #fff;
    border-bottom-color: #000;
    border-right-color: #000;
    cursor: pointer;
    font-size: 12px;
}

.flag-container {
    margin-bottom: 15px;
    text-align: center;
}

.country-flag {
    width: 100%;
    max-width: 200px;
    height: auto;
    border: 2px solid #0099CC;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.country-stats {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #0099CC;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 3px;
}

.stat-row {
    color: #fff;
    font-size: 11px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(0, 153, 204, 0.3);
}

.stat-row:last-child {
    border-bottom: none;
}

.fun-fact {
    background: rgba(255, 153, 51, 0.2);
    border: 1px solid #FFB366;
    padding: 10px;
    color: #fff;
    font-size: 11px;
    line-height: 1.4;
    margin-bottom: 15px;
    border-radius: 3px;
}

.loading-fact {
    font-style: italic;
    color: #FFB366;
}

.retro-button {
    width: 100%;
    padding: 8px;
    background: linear-gradient(180deg, #0099CC 0%, #0066AA 100%);
    border: 2px outset #0099CC;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    font-size: 12px;
    border-radius: 2px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.retro-button:hover {
    background: linear-gradient(180deg, #00AADD 0%, #0077CC 100%);
}

.retro-button:active {
    border-style: inset;
}

/* Control Bar */
.control-bar {
    background: linear-gradient(180deg, #003366 0%, #001a33 100%);
    border-top: 2px solid #0099CC;
    padding: 10px;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    gap: 5px;
}

.control-button {
    padding: 8px 12px;
    background: linear-gradient(180deg, #0066AA 0%, #003366 100%);
    border: 2px outset #0099CC;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    font-size: 11px;
    border-radius: 2px;
    white-space: nowrap;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.control-button:hover {
    background: linear-gradient(180deg, #0088CC 0%, #0055AA 100%);
}

.control-button:active {
    border-style: inset;
}

.control-button.toggle.active {
    background: linear-gradient(180deg, #FF9933 0%, #CC6600 100%);
    border-color: #FFB366;
}

.visited-counter {
    margin-left: auto;
    color: #00CCFF;
    font-weight: bold;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border: 1px solid #0099CC;
    border-radius: 2px;
}

/* Status Bar */
.status-bar {
    background: #d4d0c8;
    border-top: 1px solid #fff;
    padding: 2px 5px;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 15px;
    color: #00CCFF;
    font-size: 11px;
}

.footer a {
    color: #FFB366;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 16px;
}

::-webkit-scrollbar-track {
    background: #d4d0c8;
    border: 1px solid #808080;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0099CC 0%, #0066AA 100%);
    border: 1px solid #003366;
}

::-webkit-scrollbar-button {
    background: #c0c0c0;
    border: 1px solid #fff;
    border-bottom-color: #000;
    border-right-color: #000;
}

/* Responsive */
@media (max-width: 1200px) {
    .sidebar-left {
        width: 180px;
    }
    
    .sidebar-right {
        width: 250px;
    }
}

@media (max-width: 900px) {
    .main-content {
        flex-direction: column;
        min-height: 400px;
    }
    
    .sidebar-left,
    .sidebar-right {
        width: 100%;
        max-height: 200px;
    }
    
    .globe-container {
        min-height: 400px;
    }
}