body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

header {
    text-align: center;
    border-bottom: 2px solid #eee;
    margin-bottom: 30px;
    padding-bottom: 10px;
}

h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

h2 {
    color: #34495e;
    margin-top: 0;
}

/* --- Navigation --- */
#nav-menu {
    margin-bottom: 20px;
}

#nav-menu button {
    background: transparent;
    border: 2px solid #3498db;
    color: #3498db;
    margin: 0 5px;
    font-weight: bold;
}

#nav-menu button:hover {
    background: #3498db;
    color: white;
}

/* --- Dashboard Stats --- */
.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-group {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 5px solid #3498db;
}

.stat-group h3 {
    margin-top: 0;
    font-size: 1.1em;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 1.1em;
}

/* --- Actions --- */
#actions {
    background: #fff8e1;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ffe082;
    margin-bottom: 30px;
    text-align: center;
}

/* --- Shop Grid --- */
#shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.shop-item {
    background: white;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
}

.shop-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #3498db;
}

.shop-icon {
    font-size: 3em;
    display: block;
    margin-bottom: 10px;
}

.shop-title {
    font-weight: bold;
    font-size: 1.2em;
    display: block;
    margin-bottom: 5px;
}

.shop-cost {
    color: #e74c3c;
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
}

.shop-desc {
    font-size: 0.9em;
    color: #7f8c8d;
    margin-bottom: 15px;
    flex-grow: 1;
}

.shop-own {
    background: #ecf0f1;
    padding: 5px;
    border-radius: 4px;
    font-size: 0.9em;
    margin-bottom: 10px;
}

/* --- Buttons --- */
button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #2980b9;
}

button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

/* --- Auth --- */
#auth-section {
    max-width: 400px;
    margin: 50px auto;
    text-align: center;
    border: 1px solid #ddd;
    padding: 30px;
    border-radius: 8px;
}

input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

/* --- Table --- */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

tr:hover {
    background-color: #f5f5f5;
}

/* --- Toasts --- */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.toast {
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    margin-top: 10px;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    transform: translateY(20px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.error { background: #e74c3c; }
.toast.success { background: #2ecc71; }
.toast.info { background: #3498db; }

/* --- Floating Text --- */
.floating-text {
    position: absolute;
    font-weight: bold;
    pointer-events: none;
    animation: floatUp 1s ease-out forwards;
    z-index: 999;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

@keyframes floatUp {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-40px); }
}

/* --- Research Section --- */
#research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tech-item {
    background: #f0f8ff;
    border: 1px solid #bcdff1;
    padding: 15px;
    border-radius: 8px;
    position: relative;
}

.tech-item.unlocked {
    background: #d4edda;
    border-color: #c3e6cb;
}

.tech-cost {
    font-weight: bold;
    color: #8e44ad;
}

/* Modal */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.5); 
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto; 
    padding: 20px;
    border: 1px solid #888;
    width: 80%; 
    max-width: 800px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.city-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.city-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: transform 0.2s;
}

.city-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.city-card h3 {
    margin-top: 0;
    color: #2c3e50;
}

.city-card button {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

.city-card button:hover {
    background-color: #219150;
}

/* Employee Card */
.employee-card button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.employee-card button:hover {
    background-color: #2980b9;
}
