/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* ===== SCREEN MANAGEMENT ===== */
.screen {
    display: none;
    width: 100%;
    height: 100vh;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

/* ===== INITIALIZATION SCREEN ===== */
#init-screen {
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.init-container {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    max-width: 500px;
    width: 90%;
}

.init-container h1 {
    text-align: center;
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.init-container h2 {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 2rem;
    font-weight: 300;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-group select,
.form-group input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group select:focus,
.form-group input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s;
}

.radio-label:hover {
    border-color: #667eea;
    background-color: #f8f9fa;
}

.radio-label input[type="radio"] {
    margin-right: 0.75rem;
    margin-top: 0.25rem;
}

.radio-label span {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.radio-label small {
    display: block;
    color: #6c757d;
    font-size: 0.875em;
}

.name-input-group {
    display: flex;
    gap: 0.5rem;
}

.name-input-group input {
    flex: 1;
}

#generate-name-btn {
    padding: 0.75rem 1rem;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#generate-name-btn:hover {
    background: #218838;
}

#start-game-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s;
}

#start-game-btn:hover {
    transform: translateY(-2px);
}

/* ===== GAME SCREEN ===== */
#game-screen {
    background: #f8f9fa;
}

.game-header {
    background: white;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.business-info h1 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.business-meta {
    color: #6c757d;
    font-size: 0.9rem;
}

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

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
}

/* ===== MAIN GAME AREA ===== */
.game-main {
    display: flex;
    height: calc(100vh - 120px);
    padding: 1rem;
    gap: 1rem;
}

.game-area {
    flex: 1;
    display: flex;
    gap: 1rem;
}

.business-area {
    flex: 2;
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.main-business-building {
    text-align: center;
    position: relative;
}

.business-visual {
    width: 300px;
    height: 200px;
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    border-radius: 15px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.business-visual:hover {
    transform: translateY(-5px);
}

.main-click-button {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #00cec9 0%, #55a3ff 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.main-click-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

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

/* ===== CLICK EFFECTS ===== */
.click-effect-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.click-effect {
    position: absolute;
    color: #00b894;
    font-weight: bold;
    font-size: 1.2rem;
    animation: floatUp 1s ease-out forwards;
    pointer-events: none;
}

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

/* ===== UPGRADES PANEL ===== */
.upgrades-panel {
    flex: 1;
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-height: 100%;
    overflow-y: auto;
}

.upgrades-panel h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.upgrades-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.upgrade-item {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.upgrade-item:hover {
    border-color: #667eea;
    background-color: #f8f9fa;
}

.upgrade-item.affordable {
    border-color: #28a745;
}

.upgrade-item.unaffordable {
    opacity: 0.6;
    cursor: not-allowed;
}

.upgrade-info {
    flex: 1;
}

.upgrade-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.upgrade-description {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.upgrade-stats {
    font-size: 0.8rem;
    color: #28a745;
}

.upgrade-cost {
    font-weight: 600;
    color: #e17055;
}

.upgrade-owned {
    background: #e9ecef;
    color: #6c757d;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

/* ===== SIDE PANEL ===== */
.side-panel {
    width: 300px;
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.side-panel h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.events-section,
.quests-section,
.achievements-section {
    margin-bottom: 2rem;
}

.events-feed {
    max-height: 200px;
    overflow-y: auto;
}

.event-item {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    border-left: 4px solid #667eea;
}

.event-text {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.event-time {
    font-size: 0.75rem;
    color: #6c757d;
}

.quest-item,
.achievement-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    border: 1px solid #dee2e6;
}

.quest-item.completed {
    background: #d4edda;
    border-color: #28a745;
}

/* ===== GAME MENU ===== */
.game-menu {
    background: white;
    border-top: 1px solid #dee2e6;
    padding: 1rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.game-menu button {
    padding: 0.5rem 1rem;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.game-menu button:hover {
    background: #5a6268;
}

/* ===== NOTIFICATIONS ===== */
.notification-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
}

.notification {
    background: white;
    border-left: 4px solid #28a745;
    padding: 1rem;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 0.5rem;
    animation: slideIn 0.3s ease-out;
}

.notification.success { border-left-color: #28a745; }
.notification.warning { border-left-color: #ffc107; }
.notification.error { border-left-color: #dc3545; }
.notification.info { border-left-color: #17a2b8; }

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

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .game-main {
        flex-direction: column;
        height: auto;
    }
    
    .side-panel {
        width: 100%;
    }
    
    .stats-bar {
        flex-direction: column;
        gap: 0.5rem;
        text-align: left;
    }
}

@media (max-width: 768px) {
    .game-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .game-area {
        flex-direction: column;
    }
    
    .business-visual {
        width: 250px;
        height: 150px;
    }
    
    .init-container {
        padding: 1.5rem;
    }
}

/* ===== QUEST PROGRESS BARS ===== */
.quest-progress {
    margin: 0.5rem 0;
}

.quest-progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.quest-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.quest-progress-text {
    font-size: 0.75rem;
    color: #6c757d;
    text-align: right;
    margin-top: 0.25rem;
}

.quest-item.active {
    background: #e8f5e8;
    border-color: #28a745;
}

.quest-item.available {
    cursor: pointer;
    transition: all 0.3s;
}

.quest-item.available:hover {
    background: #f0f8ff;
    border-color: #007bff;
}

.quest-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.quest-description {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.quest-rewards {
    font-size: 0.75rem;
    color: #28a745;
    font-weight: 500;
}

/* ===== SECTOR SPECIFIC THEMES ===== */
.sector-tech .business-visual {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
}

.sector-food .business-visual {
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
}

.sector-industry .business-visual {
    background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
}

.sector-services .business-visual {
    background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
}

.sector-energy .business-visual {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
}