/* Game UI styles */
#game-ui {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(44, 62, 80, 0.95);
    border-bottom: 2px solid #34495e;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 100;
}

/* Resource bar */
#resource-bar {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(52, 73, 94, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid #34495e;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.resource-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.resource-icon.gold {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.resource-icon.gold::after {
    content: 'G';
}

.resource-icon.food {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
}

.resource-icon.food::after {
    content: 'F';
}

.resource-icon.faith {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

.resource-icon.faith::after {
    content: 'H';
}

.resource-count {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ecf0f1;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    min-width: 40px;
    text-align: right;
}

/* Player info */
#player-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.player-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(52, 73, 94, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid #34495e;
}

.player-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #f39c12;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.player-level {
    font-size: 0.9rem;
    color: #bdc3c7;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Game controls */
#game-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Tech tree modal */
#tech-tree-modal .modal-content {
    min-width: 600px;
    max-width: 800px;
}

/* Tech tree content styles */
.tech-tree-content {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: #34495e;
    border-radius: 8px;
    color: #ecf0f1;
}

/* Placement mode UI */
.placement-instruction {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(44, 62, 80, 0.95);
    border: 2px solid #f39c12;
    border-radius: 8px;
    padding: 1rem;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
}

.instruction-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.instruction-text {
    color: #ecf0f1;
    font-size: 0.9rem;
    font-weight: 500;
}

.instruction-text strong {
    color: #f39c12;
}

#cancel-placement {
    padding: 0.5rem 1rem;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s ease;
}

#cancel-placement:hover {
    background: #c0392b;
}

/* Error toast */
.error-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #e74c3c;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    z-index: 1001;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Button styles */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.tech-level {
    background: rgba(52, 73, 94, 0.8);
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid #34495e;
}

.tech-level h4 {
    color: #f39c12;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tech-level.manor {
    border-color: #95a5a6;
}

.tech-level.duchy {
    border-color: #3498db;
}

.tech-level.kingdom {
    border-color: #9b59b6;
}

.tech-level.current {
    border-color: #f39c12;
    box-shadow: 0 0 15px rgba(243, 156, 18, 0.3);
}

.tech-upgrades {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tech-upgrade {
    padding: 0.5rem;
    background: rgba(44, 62, 80, 0.6);
    border-radius: 4px;
    border: 1px solid #34495e;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tech-upgrade:hover {
    background: rgba(44, 62, 80, 0.8);
    border-color: #f39c12;
}

.tech-upgrade.available {
    border-color: #27ae60;
    background: rgba(39, 174, 96, 0.1);
}

.tech-upgrade.purchased {
    border-color: #7f8c8d;
    background: rgba(127, 140, 141, 0.1);
    cursor: not-allowed;
    opacity: 0.6;
}

.tech-upgrade.locked {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    cursor: not-allowed;
    opacity: 0.4;
}

.upgrade-title {
    font-size: 0.9rem;
    font-weight: bold;
    color: #ecf0f1;
    margin-bottom: 0.3rem;
}

.upgrade-cost {
    font-size: 0.8rem;
    color: #bdc3c7;
    margin-bottom: 0.3rem;
}

.upgrade-description {
    font-size: 0.75rem;
    color: #95a5a6;
    line-height: 1.3;
}

/* Progress button */
.progress-btn {
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
    margin-top: 1rem;
}

.progress-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}

.progress-btn:disabled {
    background: #7f8c8d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Notification system */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: rgba(44, 62, 80, 0.95);
    color: #ecf0f1;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 1001;
    animation: slideInRight 0.3s ease-out;
    max-width: 300px;
}

.notification.success {
    border-left-color: #27ae60;
}

.notification.warning {
    border-left-color: #f39c12;
}

.notification.error {
    border-left-color: #e74c3c;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #f39c12;
}

.notification-message {
    font-size: 0.9rem;
    line-height: 1.3;
}

/* Worker management panel */
.worker-panel {
    position: absolute;
    top: 5rem;
    left: 1rem;
    background: rgba(44, 62, 80, 0.95);
    border: 2px solid #34495e;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 200;
    min-width: 180px;
}

.worker-panel h4 {
    color: #f39c12;
    margin-bottom: 1rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.worker-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.worker-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(52, 73, 94, 0.6);
    border-radius: 4px;
    border: 1px solid #34495e;
    cursor: grab;
    transition: all 0.3s ease;
}

.worker-item:hover {
    background: rgba(52, 73, 94, 0.8);
    border-color: #f39c12;
}

.worker-item.dragging {
    cursor: grabbing;
    opacity: 0.7;
    transform: scale(0.95);
}

.worker-item.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
}

.worker-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid #ffffff;
    flex-shrink: 0;
}

.worker-name {
    font-size: 0.9rem;
    color: #ecf0f1;
    text-transform: capitalize;
}

.worker-status {
    font-size: 0.7rem;
    color: #95a5a6;
    margin-left: auto;
}

/* Unit control panel */
.unit-control-panel {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(44, 62, 80, 0.95);
    border: 2px solid #34495e;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 200;
    min-width: 200px;
}

.unit-control-panel h4 {
    color: #f39c12;
    margin-bottom: 1rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.unit-training-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.unit-train-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(52, 73, 94, 0.6);
    border: 1px solid #34495e;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #ecf0f1;
}

.unit-train-btn:hover {
    background: rgba(52, 73, 94, 0.8);
    border-color: #f39c12;
}

.unit-train-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.unit-train-cost {
    font-size: 0.7rem;
    color: #95a5a6;
    margin-left: auto;
}

/* Tooltip */
.tooltip {
    position: absolute;
    background: rgba(44, 62, 80, 0.95);
    color: #ecf0f1;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border: 1px solid #34495e;
    max-width: 200px;
    line-height: 1.3;
}

.tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(44, 62, 80, 0.95);
} 