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

body {
    font-family: 'Poppins', sans-serif;
    background: #0a0e27;
    color: #ffffff;
    overflow-x: hidden;
}

.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    overflow-y: auto;
}

.screen.active {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.5s ease;
}

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

/* Animated Stars Background */
.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.stars::before,
.stars::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    box-shadow: 
        100px 200px white,
        200px 100px white,
        300px 300px white,
        400px 150px white,
        500px 250px white,
        600px 100px white,
        700px 350px white,
        800px 200px white,
        900px 400px white,
        1000px 150px white,
        1100px 300px white,
        1200px 250px white,
        150px 450px white,
        350px 500px white,
        550px 450px white,
        750px 550px white,
        950px 500px white,
        1150px 450px white,
        250px 600px white,
        450px 650px white,
        650px 600px white,
        850px 700px white,
        1050px 650px white;
    animation: twinkle 3s infinite;
}

.stars::after {
    animation-delay: 1.5s;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
}

/* Home Screen */
.home-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    padding: 2rem;
}

.game-title {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: titleFloat 3s ease-in-out infinite;
}

.title-icon {
    font-size: 4rem !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.subtitle {
    font-size: 1.2rem;
    color: #a0aec0;
    margin-bottom: 3rem;
    font-weight: 300;
}

.btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.stats-preview {
    display: flex;
    gap: 2rem;
    margin-top: 4rem;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUp 0.6s ease forwards;
    opacity: 0;
}

.stat-item:nth-child(1) {
    animation-delay: 0.2s;
}

.stat-item:nth-child(2) {
    animation-delay: 0.4s;
}

.stat-item:nth-child(3) {
    animation-delay: 0.6s;
}

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

/* Name Screen */
.content-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
}

.content-container h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.input-group {
    position: relative;
    width: 100%;
    margin-bottom: 2rem;
}

.input-group input {
    width: 100%;
    padding: 1.2rem 3rem 1.2rem 1.5rem;
    font-size: 1.2rem;
    font-family: 'Poppins', sans-serif;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    color: white;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
}

/* Map Screen */
.map-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.map-container h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.empire-info {
    text-align: center;
    font-size: 1.3rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #ffd700;
}

.world-map {
    position: relative;
    width: 100%;
    height: 600px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.world-map-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    pointer-events: none;
}

.location {
    position: absolute;
    cursor: pointer;
    transition: all 0.3s ease;
}

.location-marker {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.5);
    animation: pulse 2s infinite;
    position: relative;
    transform: translate(-50%, -50%);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 5px 20px rgba(102, 126, 234, 0.5);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 5px 30px rgba(102, 126, 234, 0.8);
    }
}

.location-marker .material-icons {
    color: white;
    font-size: 30px;
}

.location-info {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: rgba(10, 14, 39, 0.95);
    padding: 1rem;
    border-radius: 15px;
    border: 2px solid #667eea;
    min-width: 250px;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.location:hover .location-info {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

.location:hover .location-marker {
    transform: scale(1.2);
}

.location-info h3 {
    margin-bottom: 0.5rem;
    color: #ffd700;
}

.location-info p {
    font-size: 0.9rem;
    color: #a0aec0;
    margin-bottom: 0.5rem;
}

.location-stats {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.85rem;
}

.location-stats span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.location-stats .material-icons {
    font-size: 16px;
}

/* Game Screen */
.game-interface {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
}

.game-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.empire-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffd700;
}

.time-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: center;
}

.speed-btn {
    padding: 0.5rem 1rem;
    background: rgba(102, 126, 234, 0.2);
    border: 2px solid rgba(102, 126, 234, 0.5);
    border-radius: 10px;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.speed-btn:hover {
    background: rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.speed-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.btn-pause {
    padding: 0.5rem 1.2rem;
    background: rgba(245, 101, 101, 0.2);
    border: 2px solid rgba(245, 101, 101, 0.5);
    border-radius: 10px;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-pause:hover {
    background: rgba(245, 101, 101, 0.4);
    transform: translateY(-2px);
}

.game-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.stat strong {
    color: #667eea;
}

.progress-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 2%;
    transition: width 0.5s ease;
    border-radius: 15px;
}

.progress-text {
    text-align: center;
    color: #a0aec0;
}

.tab-navigation {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
    flex: 1;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

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

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

.notifications-panel {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(10, 14, 39, 0.95);
    padding: 1rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 400px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.notifications-panel h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #ffd700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#notificationsContainer {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notification-item {
    padding: 0.8rem;
    background: rgba(102, 126, 234, 0.15);
    border-radius: 10px;
    border-left: 3px solid #667eea;
    font-size: 0.85rem;
    color: #cbd5e0;
    animation: slideInRight 0.4s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.notification-item.warning {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
}

.notification-item.danger {
    border-left-color: #f56565;
    background: rgba(245, 101, 101, 0.15);
}

.notification-item.success {
    border-left-color: #48bb78;
    background: rgba(72, 187, 120, 0.15);
}

.notification-item .material-icons {
    font-size: 18px;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.decision-container {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.decision-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #ffd700;
}

.decision-text {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: #cbd5e0;
}

.choices {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.choice-btn {
    padding: 1.5rem;
    background: rgba(102, 126, 234, 0.2);
    border: 2px solid rgba(102, 126, 234, 0.5);
    border-radius: 15px;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.choice-btn:hover {
    background: rgba(102, 126, 234, 0.4);
    border-color: #667eea;
    transform: translateX(10px);
}

.choice-btn .material-icons {
    font-size: 24px;
}

.world-map-view {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.world-map-view h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.map-container-game {
    position: relative;
    width: 100%;
    height: 600px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.world-map-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

#territoryCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#territoryMarkers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.territory-marker {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: markerPulse 2s infinite;
    transform: translate(-50%, -50%);
}

.territory-marker.player {
    background: rgba(102, 126, 234, 0.8);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.6);
}

.territory-marker.ai {
    background: rgba(245, 101, 101, 0.8);
    box-shadow: 0 0 20px rgba(245, 101, 101, 0.6);
}

.territory-marker .material-icons {
    color: white;
    font-size: 24px;
}

@keyframes markerPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.map-legend {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.map-legend h4 {
    margin-bottom: 1rem;
    color: #ffd700;
}

.legend-items {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.legend-color {
    width: 25px;
    height: 25px;
    border-radius: 5px;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.ai-empires-panel {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-empires-panel h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.ai-empires-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.ai-empire-card {
    background: rgba(102, 126, 234, 0.1);
    padding: 1rem;
    border-radius: 15px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.ai-empire-card:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.ai-empire-card h4 {
    color: #ffd700;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.ai-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.ai-stats span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.ai-stats .material-icons {
    font-size: 16px;
}

.ai-strategy {
    font-size: 0.85rem;
    color: #a0aec0;
    font-style: italic;
}

.game-log {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 300px;
    overflow-y: auto;
}

.game-log h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.log-entry {
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    font-size: 0.9rem;
    color: #a0aec0;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.log-entry.positive {
    border-left: 3px solid #48bb78;
}

.log-entry.negative {
    border-left: 3px solid #f56565;
}

.log-entry.neutral {
    border-left: 3px solid #667eea;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.8);
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-title {
        font-size: 2.5rem;
    }
    
    .game-stats {
        gap: 1rem;
    }
    
    .stat {
        font-size: 0.9rem;
    }
    
    .world-map {
        height: 400px;
    }
    
    .stats-preview {
        flex-direction: column;
        gap: 1rem;
    }
    .player-empire-panel {
    margin-top: 20px;
    background-color: rgba(20, 20, 40, 0.7);
    padding: 15px;
    border-radius: 12px;
}

.player-empire-info p {
    margin: 6px 0;
}
}

