/* 基礎樣式保持不變 */
/* Base city view styles - keep these first */
#city-view {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 600px;
    position: relative;
    padding: 20px;
    color: #fff;
}

#city-view.lists-visible .content {
	overflow-y: auto;
}
#city-view::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

/* Faction-specific styles - simplified selectors */
#city-view.shu-city {
    background-image: url('../img/city1.JPG');
}

#city-view.shu-city::before {
    background-color: rgba(139, 0, 0, 0.4); /* 深紅半透明 */
}

#city-view.wei-city {
    background-image: url('../img/city2.JPG');
}

#city-view.wei-city::before {
    background-color: rgba(30, 144, 255, 0.3); /* 藍色半透明 */
}

#city-view.wu-city {
    background-image: url('../img/city3.JPG');
}

#city-view.wu-city::before {
    background-color: rgba(218, 165, 32, 0.3); /* 金黃半透明 */
}

/* Button styles - simplified selectors */
.shu-city .city-options button {
    background-color: rgba(139, 0, 0, 0.8);
    border: 1px solid gold;
}

.wei-city .city-options button {
    background-color: rgba(30, 144, 255, 0.8);
    border: 1px solid silver;
}

.wu-city .city-options button {
    background-color: rgba(218, 165, 32, 0.8);
    border: 1px solid #8B4513;
    color: #333;
}
.wu-city #generals-list ,.wu-city #adjacent-cities-list {
	background-color: #625900d4;
}
.wu-city .general-item h4, .wu-city .general-item p
{
	color: #ffffff;
}
.wu-city .city-item p
{
	color: #ffffff;
}
/* General item styles */
.shu-city .general-item,
.shu-city .city-item {
    border: 1px solid #8B0000;
    background-color: rgba(255, 255, 255, 0.9);
}

.wei-city .general-item,
.wei-city .city-item {
    border: 1px solid #1E90FF;
    background-color: rgb(40 86 95 / 95%);
}


/* 共用樣式保持不變 */
#city-view .header,
#city-view .content {
    position: relative;
    z-index: 1;
}

#city-view .content {
	overflow-y: hidden;
}
.city-info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 3px;
}

.city-info-row p {
    margin: 0;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 5px 10px;
    border-radius: 4px;
}

.content {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 5px;
}

#generals-list {
    width: 50%;
    padding: 15px;
    border-radius: 8px;
    order: 1;
}

.general-item {
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
    color: #333;
}

#adjacent-cities-list {
    width: 25%;
    padding: 15px;
    border-radius: 8px;
    order: 2;
}

.city-item {
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
    color: #333;
}

.city-item h4 {
    margin-top: 0;
    margin-bottom: 8px;
}

.city-options {
    width: 25%;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    padding: 15px;
    border-radius: 8px;
    gap: 10px;
    order: 0;
}

.city-options button {
    margin: 4px 0;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.city-options button:hover {
    transform: translateY(-2px);
}

.city-lord-info {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 1px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.city-lord-info h3 {
    margin-top: 0;
}
/* Responsive adjustments */
@media (max-width: 768px) {
    .content {
        flex-wrap: wrap;
    }
    /* 默認情況下隱藏武將列表和相鄰城市列表 */
    #generals-list,
    #adjacent-cities-list {
        display: none;
        width: 100%;
        margin-bottom: 20px;
    }
    
    /* 添加一個切換按鈕樣式 */
    .toggle-lists-btn {
        display: block;
        width: 100%;
        padding: 3px;
        background-color: rgba(139, 0, 0, 0.8);
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        margin-bottom: 10px;
        text-align: center;
    }
    
    /* 當列表顯示時的樣式 */
    .lists-visible #generals-list,
    .lists-visible #adjacent-cities-list {
        display: block;
    }
    
    .city-options {
        width: 100%;
        margin-bottom: 20px;
        order: 0;
    }
    #generals-list,
    #adjacent-cities-list,
    .city-options {
        width: 100%;
        margin-bottom: 20px;
    }
    
}
/* 電腦版保持原樣 */
@media (min-width: 768px) {
    .toggle-lists-btn {
        display: none;
    }
    
    #generals-list,
    #adjacent-cities-list {
        display: block !important;
		overflow: overlay;
    }
}
/* Header styles */
.military-view .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.city-resources {
    display: flex;
    gap: 20px;
    font-size: 18px;
    color: #fff;
}

.city-resources span {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 5px 10px;
    border-radius: 4px;
    color: #fff;
}

#city-name {
    color: #fff;
    text-shadow: 1px 1px 3px rgba(250, 250, 250, 0.8);
}

#city-info {
    color: #fff;
}