/* COLONY PAGES INDEX */
.colony-management {
    grid-column: 2;
    grid-row: 2;
    padding: 20px;
    overflow-y: auto;
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: 20px;
}

.section-title {
    color: var(--colony);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.colony-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.overview-card {
    background-color: var(--surface);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1rem;
    color: var(--colony);
    font-weight: bold;
}

.card-icon {
    width: 30px;
    height: 30px;
    background-color: var(--colony-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.card-value {
    font-size: 1.8rem;
    font-weight: bold;
    text-align: center;
    color: var(--colony-light);
}

.card-subtitle {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.card-trend {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: var(--accent);
}

.negative-trend {
    color: #f44336;
}

.colony-visualization {
    background-color: var(--surface);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.visualization-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.visualization-title {
    font-size: 1.2rem;
    color: var(--colony);
    display: flex;
    align-items: center;
    gap: 10px;
}

.visualization-controls {
    display: flex;
    gap: 10px;
}

.control-btn {
    padding: 5px 10px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.control-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.colony-display {
    height: 400px;
    background-color: #2a1b0d;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.colony-chamber {
    position: absolute;
    background-color: #4d2e1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s;
}

.colony-chamber:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 183, 77, 0.5);
}

.colony-tunnel {
    position: absolute;
    background-color: #3d2314;
    border-radius: 4px;
}

.ant-icon {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #8b4513;
    animation: move 20s linear infinite;
}

@keyframes move {
    0% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(50px, 30px);
    }
    50% {
        transform: translate(100px, -20px);
    }
    75% {
        transform: translate(50px, -50px);
    }
    100% {
        transform: translate(0, 0);
    }
}

.population-section {
    margin-top: 20px;
}

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

.population-title {
    font-size: 1.2rem;
    color: var(--colony);
}

.population-chart {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.population-card {
    background-color: var(--surface);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.population-type {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.type-icon {
    width: 30px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.worker-icon {
    background-color: rgba(139, 195, 74, 0.2);
    color: #8bc34a;
}

.soldier-icon {
    background-color: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.queen-icon {
    background-color: rgba(156, 39, 176, 0.2);
    color: #9c27b0;
}

.larvae-icon {
    background-color: rgba(240, 98, 146, 0.2);
    color: #f06292;
}

.type-name {
    font-weight: bold;
    font-size: 1.1rem;
}

.population-count {
    font-size: 1.8rem;
    font-weight: bold;
    text-align: center;
    margin: 10px 0;
}

.population-percent {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

.population-bar {
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.worker-fill {
    height: 100%;
    width: 75%;
    background-color: #8bc34a;
    border-radius: 4px;
}

.soldier-fill {
    height: 100%;
    width: 15%;
    background-color: #f44336;
    border-radius: 4px;
}

.queen-fill {
    height: 100%;
    width: 0.5%;
    background-color: #9c27b0;
    border-radius: 4px;
}

.larvae-fill {
    height: 100%;
    width: 9.5%;
    background-color: #f06292;
    border-radius: 4px;
}

.population-actions {
    display: flex;
    justify-content: center;
}

.population-btn {
    padding: 5px 10px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text);
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.population-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modules-section {
    margin-top: 20px;
}

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

.modules-title {
    font-size: 1.2rem;
    color: var(--colony);
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.module-card {
    background-color: var(--surface);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.module-header {
    padding: 15px;
    background-color: rgba(255, 183, 77, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.module-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--colony);
    display: flex;
    align-items: center;
    gap: 10px;
}

.module-icon {
    width: 30px;
    height: 30px;
    background-color: var(--colony);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.module-level {
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    background-color: var(--colony-dark);
}

.module-body {
    padding: 15px;
}

.module-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.module-info-label {
    color: rgba(255, 255, 255, 0.7);
}

.module-progress {
    margin: 15px 0;
}

.module-actions {
    display: flex;
    justify-content: space-between;
}

.module-btn {
    padding: 8px 15px;
    border-radius: 4px;
    background-color: var(--colony);
    border: none;
    color: var(--background);
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.module-btn:hover {
    background-color: var(--colony-dark);
}

.module-btn.secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.module-btn.secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.events-section {
    margin-top: 20px;
}

.events-list {
    background-color: var(--surface);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.event-item {
    display: flex;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.event-item:last-child {
    border-bottom: none;
}

.event-icon {
    width: 30px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.event-positive {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.event-negative {
    background-color: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.event-neutral {
    background-color: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.event-content {
    flex: 1;
}

.event-title {
    font-weight: bold;
    margin-bottom: 3px;
}

.event-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.event-time {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: right;
}

.status-bar {
    grid-column: 1 / 4;
    grid-row: 3;
    background-color: var(--surface);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.status-info {
    flex: 1;
}

.progress-container {
    flex: 2;
    height: 60px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.progress-title {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.progress-bar {
    height: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 65%;
    background-color: var(--colony);
    border-radius: 5px;
}

.status-actions {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.action-btn {
    padding: 8px 15px;
    border-radius: 4px;
    background-color: var(--primary);
    border: none;
    color: var(--text);
    cursor: pointer;
    transition: background-color 0.3s;
}

.action-btn:hover {
    background-color: #ff8c24;
}

.right-panel {
    grid-column: 3;
    grid-row: 2;
    background-color: var(--surface);
    padding: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
}

.panel-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--colony);
}

.resource-overview {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.resource-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--colony);
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 10px;
}

.resource-item {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.resource-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.resource-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 0.9rem;
}

.resource-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.food-icon {
    background-color: #8bc34a;
}

.materials-icon {
    background-color: #8d6e63;
}

.energy-icon {
    background-color: #ffc107;
}

.special-icon {
    background-color: #9c27b0;
}

.resource-storage {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.storage-bar {
    height: 5px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.storage-fill {
    height: 100%;
    background-color: var(--colony);
    border-radius: 3px;
}

.resource-rate {
    font-size: 0.8rem;
    color: var(--accent);
}

.storage-warning {
    color: #ffc107;
}

.storage-danger {
    color: #f44336;
}

.objectives-section {
    margin-top: 20px;
}

.objectives-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.objective-item {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
}

.objective-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.objective-title {
    font-weight: bold;
    font-size: 1rem;
}

.objective-type {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 10px;
    background-color: var(--colony);
}

.objective-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

.objective-progress {
    margin-bottom: 10px;
}

.objective-reward {
    font-size: 0.9rem;
    color: var(--colony-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.weather-section {
    margin-top: 20px;
}

.weather-info {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
}

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

.weather-current {
    display: flex;
    align-items: center;
    gap: 15px;
}

.weather-icon {
    font-size: 3rem;
}

.weather-details {
    flex: 1;
}

.weather-type {
    font-weight: bold;
    font-size: 1.1rem;
}

.weather-temp {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.weather-forecast {
    display: flex;
    justify-content: space-between;
}

.forecast-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.forecast-icon {
    font-size: 1.5rem;
}

.forecast-name {
    font-size: 0.8rem;
}

.forecast-temp {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}