/* Sect UI - extracted from inline index.html */

/* Bloodline Builder Styles */
.palette-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

.palette-block:active {
    cursor: grabbing !important;
}

.bloodline-subtab:hover {
    background: rgba(78, 205, 196, 0.4) !important;
}

.bloodline-subtab.active {
    background: rgba(78, 205, 196, 0.5) !important;
    box-shadow: 0 0 15px rgba(78, 205, 196, 0.4);
}

/* Sect Action Buttons */
.sect-action-btn {
    flex: 1 1 calc(33.333% - 10px);
    max-width: 180px;
    min-width: 140px;
    padding: 15px 20px;
    font-size: 1em;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #3a3a5c, #2a2a4c);
    border: 2px solid #4ecdc4;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sect-action-btn:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, #4a4a6c, #3a3a5c);
    border-color: #5fd4cc;
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.sect-action-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(78, 205, 196, 0.3);
}

/* ========================================
   SECT MEMBERSHIP UI
   ======================================== */
.sm-panel { padding: 12px; display: flex; flex-direction: column; gap: 10px; height: 100%; }

/* Header */
.sm-header { display: flex; justify-content: space-between; align-items: center; }
.sm-header-title { display: flex; flex-direction: column; gap: 2px; }
.sm-sect-name { font-size: 15px; font-weight: 700; color: #e8d5b7; letter-spacing: 0.5px; }
.sm-rank { font-size: 12px; font-weight: 600; }
.sm-header-stats { display: flex; gap: 12px; }
.sm-stat-box { display: flex; flex-direction: column; align-items: flex-end; }
.sm-stat-label { font-size: 10px; color: #666; text-transform: uppercase; letter-spacing: 0.5px; }
.sm-stat-value { font-size: 15px; font-weight: 700; }
.sm-color-accent { color: #4ecdc4; }
.sm-color-gold { color: #ffd700; }

/* Promotion */
.sm-promotion { padding: 8px 10px; background: rgba(255,255,255,0.03); border-radius: 6px; border-left: 3px solid #666; }
.sm-promotion-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.sm-promotion-label { font-size: 11px; color: #888; }
.sm-promotion-count { font-size: 10px; color: #666; }
.sm-trial-btn { width: 100%; margin-top: 6px; padding: 5px; background: transparent; border: 1px solid; border-radius: 4px; cursor: pointer; font-size: 11px; transition: background 0.2s; }
.sm-trial-btn:hover { background: rgba(255,255,255,0.05); }
.sm-trial-info { display: block; text-align: center; font-size: 10px; color: #666; margin-top: 4px; }

/* Progress bar shared */
.sm-progress-track { height: 5px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.sm-progress-lg { height: 8px; border-radius: 4px; }
.sm-progress-fill { height: 100%; border-radius: inherit; transition: width 0.4s ease; }

/* Quest 3-column layout */
.sm-quest-layout { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 1px; flex: 1; min-height: 0; background: rgba(255,255,255,0.04); border-radius: 6px; overflow: hidden; border: 1px solid rgba(255,255,255,0.06); }
.sm-quest-col { background: rgba(10,10,20,0.6); padding: 8px; display: flex; flex-direction: column; min-height: 200px; }
.sm-col-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; padding-bottom: 5px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.sm-col-header span:first-child { font-size: 11px; font-weight: 600; color: #aaa; text-transform: uppercase; letter-spacing: 0.8px; }
.sm-col-sub { font-size: 9px; color: #555; }

/* Board column */
.sm-card-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; }
.sm-mission-card { padding: 6px 8px; border-radius: 4px; cursor: pointer; border: 1px solid rgba(255,255,255,0.04); background: rgba(255,255,255,0.02); transition: border-color 0.2s, background 0.2s; }
.sm-mission-card:hover { border-color: var(--rarity-color, rgba(78,205,196,0.4)); background: rgba(255,255,255,0.04); }
.sm-mission-card-top { display: flex; justify-content: space-between; align-items: center; }
.sm-rarity-tag { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.sm-mission-pts { font-size: 9px; color: #555; }
.sm-mission-card-name { font-size: 11px; color: #ccc; margin: 2px 0 1px; }
.sm-mission-card-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 1px; }
.sm-mission-card-realm { font-size: 9px; color: #e67e22; }
.sm-mission-card-rewards { font-size: 10px; color: #4ecdc4; }

/* Queue column */
.sm-queue-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.sm-queue-item { display: flex; justify-content: space-between; align-items: center; padding: 5px 6px; border-radius: 3px; background: rgba(255,255,255,0.02); font-size: 11px; }
.sm-queue-active { background: rgba(78,205,196,0.08); border-left: 2px solid #4ecdc4; }
.sm-queue-item-info { display: flex; align-items: center; gap: 5px; min-width: 0; }
.sm-rarity-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.sm-queue-item-name { color: #ccc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-queue-item-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.sm-queue-item-realm { font-size: 9px; color: #e67e22; }
.sm-queue-item-reward { font-size: 10px; color: #4ecdc4; }
.sm-queue-remove { background: none; border: none; color: #e74c3c; cursor: pointer; font-size: 10px; padding: 0 3px; opacity: 0.5; }
.sm-queue-remove:hover { opacity: 1; }
.sm-queue-btn { width: 100%; margin-top: 6px; padding: 6px; border: none; border-radius: 4px; cursor: pointer; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; transition: filter 0.2s; }
.sm-queue-btn:hover { filter: brightness(1.2); }
.sm-btn-start { background: rgba(78,205,196,0.2); color: #4ecdc4; }
.sm-btn-stop { background: rgba(231,76,60,0.2); color: #e74c3c; }

/* Visual area */
.sm-visual-idle, .sm-visual-active { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 8px; }
.sm-visual-svg { opacity: 0.7; }
.sm-visual-text { font-size: 12px; color: #555; text-transform: uppercase; letter-spacing: 1px; }
.sm-visual-animated { animation: sm-bob 2s ease-in-out infinite; }
@keyframes sm-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.sm-visual-mission-name { font-size: 14px; font-weight: 700; margin-top: 4px; }
.sm-visual-rarity { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.sm-visual-progress-wrap { width: 80%; max-width: 240px; }
.sm-visual-progress-info { display: flex; justify-content: space-between; font-size: 10px; color: #666; margin-top: 3px; }
.sm-visual-stat-info { font-size: 10px; color: #555; }

/* Footer */
.sm-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sm-footer-info { font-size: 11px; color: #666; }
.sm-footer-btn { padding: 5px 14px; border-radius: 4px; cursor: pointer; font-size: 11px; border: 1px solid; transition: background 0.2s; }
.sm-btn-challenge { background: rgba(231,76,60,0.15); color: #e74c3c; border-color: rgba(231,76,60,0.3); }
.sm-btn-challenge:hover { background: rgba(231,76,60,0.25); }
.sm-btn-leave { background: transparent; color: #666; border-color: rgba(255,255,255,0.08); }
.sm-btn-leave:hover { color: #e74c3c; border-color: rgba(231,76,60,0.3); }

.sm-empty { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 10px; color: #444; text-align: center; padding: 12px; }

/* Auto toggle */
.sm-auto-toggle { display: flex; align-items: center; gap: 4px; cursor: pointer; padding: 2px 6px; border-radius: 3px; transition: background 0.2s; }
.sm-auto-toggle:hover { background: rgba(255,255,255,0.05); }
.sm-auto-label { font-size: 9px; color: #666; text-transform: uppercase; letter-spacing: 0.5px; }
.sm-auto-indicator { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15); transition: all 0.2s; }
.sm-auto-on { background: #4ecdc4; border-color: #4ecdc4; box-shadow: 0 0 4px rgba(78,205,196,0.5); }

/* Scrollbar for quest lists */
.sm-card-list::-webkit-scrollbar, .sm-queue-list::-webkit-scrollbar { width: 3px; }
.sm-card-list::-webkit-scrollbar-thumb, .sm-queue-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }


/* New Sect System v2 Styles */
.sect-overview {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
}

.sect-resources {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px;
    background: rgba(78, 205, 196, 0.1);
    border: 2px solid #4ecdc4;
    border-radius: 10px;
}

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

.resource-icon {
    font-size: 1.5em;
}

.resource-value {
    font-size: 1.2em;
    font-weight: bold;
    color: #4ecdc4;
}

.resource-name {
    font-size: 0.8em;
    color: #888;
}

.resource-gen {
    font-size: 0.75em;
    color: #22c55e;
}

.sect-stability {
    padding: 15px;
    background: rgba(255, 165, 0, 0.1);
    border: 2px solid #ffa500;
    border-radius: 10px;
}

.stability-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #ffa500;
    font-weight: bold;
}

.stability-change.positive { color: #4ecdc4; }
.stability-change.negative { color: #ff6b6b; }

.stability-bar-container {
    height: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
}

.stability-bar {
    height: 100%;
    transition: width 0.5s ease;
}

.stability-bar.stability-high { background: linear-gradient(90deg, #4ecdc4, #45b7aa); }
.stability-bar.stability-medium { background: linear-gradient(90deg, #ffa500, #ff8c00); }
.stability-bar.stability-low { background: linear-gradient(90deg, #ff6b6b, #ff4444); }

.stability-values {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 0.9em;
    color: #888;
}

.production-mod {
    color: #ffd700;
}

/* Sect Alignment */
.sect-alignment {
    padding: 15px;
    background: rgba(128, 128, 128, 0.1);
    border: 2px solid #666;
    border-radius: 10px;
}

.alignment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #aaa;
    font-weight: bold;
}

.alignment-tier {
    font-weight: bold;
}

.alignment-bar-container {
    position: relative;
    height: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: visible;
}

.alignment-bar-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
        #9b59b6 0%,
        #e74c3c 25%,
        #95a5a6 50%,
        #4ecdc4 75%,
        #f1c40f 100%
    );
    border-radius: 8px;
    opacity: 0.6;
}

.alignment-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 24px;
    background: #fff;
    border: 3px solid #666;
    border-radius: 4px;
    transition: left 0.5s ease, border-color 0.3s ease;
}

.alignment-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 0.85em;
}

.alignment-label-demonic {
    color: #9b59b6;
}

.alignment-label-righteous {
    color: #f1c40f;
}

.alignment-value {
    font-weight: bold;
    font-size: 1.1em;
}

.sect-servants {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: rgba(138, 43, 226, 0.1);
    border: 2px solid #8a2be2;
    border-radius: 10px;
}

.servant-icon { font-size: 1.5em; }
.servant-count { font-size: 1.2em; font-weight: bold; color: #8a2be2; }
.servant-label { color: #888; }

.servant-config-btn {
    background: rgba(138, 43, 226, 0.3);
    border: 1px solid #8a2be2;
    border-radius: 6px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.3s;
    margin-left: 10px;
}

.servant-config-btn:hover {
    background: rgba(138, 43, 226, 0.5);
    transform: rotate(90deg);
}

/* Servant Config Modal */
.servant-config-modal {
    padding: 20px;
}

.servant-config-desc {
    text-align: center;
    color: #ccc;
    margin-bottom: 20px;
}

.servant-allocation-sliders {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.allocation-slider-row {
    display: grid;
    grid-template-columns: 120px 1fr 120px;
    align-items: center;
    gap: 15px;
}

.allocation-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.allocation-icon {
    font-size: 1.3em;
}

.allocation-name {
    font-weight: bold;
    color: #f0f0f0;
}

.allocation-slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.allocation-slider {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    outline: none;
}

.allocation-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #8a2be2;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.allocation-slider::-webkit-slider-thumb:hover {
    background: #a855f7;
}

.allocation-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #8a2be2;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.allocation-value-container {
    display: flex;
    align-items: center;
    gap: 2px;
}

.allocation-value-input {
    width: 50px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    text-align: center;
    font-size: 1em;
}

.allocation-percent {
    color: #888;
}

.allocation-servants {
    text-align: right;
    color: #8a2be2;
    font-size: 0.9em;
}

.servant-allocation-total {
    text-align: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 1.1em;
}

.servant-allocation-total span:first-child {
    font-weight: bold;
}

.allocation-warning {
    color: #ff6b6b;
    margin-left: 10px;
    font-weight: bold;
}

.servant-output-preview {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.servant-output-preview h4 {
    text-align: center;
    margin-bottom: 10px;
    color: #f0f0f0;
}

.output-preview-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    color: #ccc;
}

.btn-confirm-allocation {
    padding: 12px 40px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1em;
    margin-left: 10px;
}

.btn-confirm-allocation:hover:not(:disabled) {
    background: linear-gradient(135deg, #2dd269, #1eb855);
}

.btn-confirm-allocation:disabled {
    background: rgba(100, 100, 100, 0.5);
    cursor: not-allowed;
}

.sect-disciples-summary {
    padding: 15px;
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid #ffd700;
    border-radius: 10px;
}

.disciples-total {
    text-align: center;
    font-size: 1.1em;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 10px;
}

.disciples-breakdown {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.disciple-rank-count {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rank-name { font-size: 0.9em; color: #888; }
.rank-count { font-size: 1.2em; font-weight: bold; color: #fff; }

.daily-upkeep, .mission-slots {
    text-align: center;
    color: #888;
    font-size: 0.9em;
}

.sect-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.sect-btn {
    padding: 12px 20px;
    font-size: 1em;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #3a3a5c, #2a2a4c);
    border: 2px solid #4ecdc4;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sect-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #4a4a6c, #3a3a5c);
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.3);
}

/* Sect Modals */
.buildings-modal, .disciples-modal, .recruitment-modal {
    padding: 20px;
}

.buildings-grid, .disciples-list, .candidates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.building-card, .disciple-card, .candidate-card {
    padding: 15px;
    background: rgba(30, 30, 50, 0.8);
    border: 2px solid #4ecdc4;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.building-card:hover, .disciple-card:hover, .candidate-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.3);
}

.candidate-card {
    cursor: pointer;
}

.btn-upgrade, .btn-small {
    padding: 8px 16px;
    font-size: 0.9em;
    background: linear-gradient(135deg, #4ecdc4, #45b7aa);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-upgrade:hover, .btn-small:hover {
    background: linear-gradient(135deg, #5fd4cc, #4ecdc4);
}

.btn-upgrade.disabled, .btn-small.disabled {
    background: #444;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b, #ff4444);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ff7b7b, #ff5555);
}

.btn-promote {
    background: linear-gradient(135deg, #4ecdc4, #2ecc71);
}

.btn-promote:hover {
    background: linear-gradient(135deg, #5fd4cc, #3edc81);
}

.btn-demote {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.btn-demote:hover {
    background: linear-gradient(135deg, #f5a623, #f08532);
}

/* ===== SECT MODALS DETAILED STYLES ===== */

/* Disciples Modal */
.disciples-modal {
    color: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.disciples-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 0;
    padding: 15px;
    border-radius: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    color: #4ecdc4;
    font-weight: bold;
}

.filter-group select {
    padding: 8px 12px;
    background: rgba(30, 30, 50, 0.9);
    border: 2px solid #4ecdc4;
    border-radius: 5px;
    color: #fff;
    font-size: 0.95em;
    cursor: pointer;
}

.filter-group select:hover {
    border-color: #ffd700;
}

.disciples-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px 0;
    grid-template-columns: repeat(5, 1fr);
}

.disciples-modal .crafting-footer,
.disciple-missions-modal .crafting-footer {
    margin-top: 0;
    padding: 15px;
    flex-shrink: 0;
}

.disciple-missions-modal {
    color: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.missions-inner {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.disciple-missions-modal .disciples-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

.no-disciples {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 1.2em;
}

.disciple-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

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

.disciple-name {
    font-size: 1.1em;
    font-weight: bold;
}

.disciple-weapon {
    font-size: 1.3em;
}

.disciple-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
}

.disciple-rank {
    color: #4ecdc4;
}

.disciple-realm {
    color: #888;
    font-size: 0.85em;
}

.disciple-proficiency {
    color: #f59e0b;
    font-size: 0.85em;
    padding: 4px 8px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 4px;
    margin: 4px 0;
}

.disciple-crafting-talents {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.8em;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    margin: 4px 0;
}

.crafting-talent-item {
    display: flex;
    gap: 4px;
}

.disciple-stats {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.9em;
    color: #ccc;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
}

.disciple-multipliers {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.8em;
    color: #888;
}

.stat-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.disciple-cost {
    font-size: 0.85em;
    color: #ffd700;
}

.disciple-status {
    font-size: 0.85em;
}

.disciple-status .on-mission {
    color: #ff9800;
}

.disciple-status .available {
    color: #4caf50;
}

.disciple-status .workshop {
    color: #2196f3;
}

.disciple-status .shopkeeper {
    color: #ffd700;
}

.disciple-status .busy {
    color: #f44336;
}

.disciple-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.disciple-actions button {
    flex: 1 1 auto;
    min-width: 60px;
    padding: 6px 10px;
    font-size: 0.85em;
}

/* Disciple Detail Modal */
.disciple-detail-modal {
    display: flex;
    flex-direction: column;
    gap: 20px;
    color: #fff;
}

.disciple-detail-header {
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #444;
}

.disciple-name-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.disciple-name-input {
    background: transparent;
    border: 2px solid;
    font-size: 1.5em;
    padding: 8px 15px;
    border-radius: 8px;
    text-align: center;
    font-family: inherit;
    min-width: 200px;
}

.disciple-subtitle {
    color: #aaa;
    font-size: 1em;
}

.disciple-detail-section {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
}

.disciple-detail-section h3 {
    color: #ffd700;
    margin-bottom: 15px;
    border-bottom: 1px solid #444;
    padding-bottom: 8px;
    font-size: 1.1em;
}

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

.stat-box {
    background: rgba(78, 205, 196, 0.1);
    border: 1px solid #4ecdc4;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.stat-box.highlight {
    background: rgba(255, 215, 0, 0.1);
    border-color: #ffd700;
}

.stat-label {
    display: block;
    color: #888;
    font-size: 0.85em;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    color: #4ecdc4;
    font-size: 1.3em;
    font-weight: bold;
}

.stat-box.highlight .stat-value {
    color: #ffd700;
}

.stat-mult {
    display: block;
    color: #666;
    font-size: 0.75em;
    margin-top: 3px;
}

.talent-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.talent-box {
    border: 2px solid;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
}

.talent-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.talent-icon {
    font-size: 1.3em;
}

.talent-name {
    font-weight: bold;
    font-size: 0.95em;
}

.talent-points {
    color: #fff;
    font-size: 1.1em;
    margin-bottom: 5px;
    text-align: center;
    width: 100%;
}

.talent-bonus {
    color: #4ecdc4;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.talent-desc {
    color: #888;
    font-size: 0.75em;
}

.proficiency-info {
    margin-top: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.proficiency-bonus {
    color: #4ecdc4;
    font-weight: bold;
}

.cultivation-manual-display {
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid #4ecdc4;
}

.manual-name {
    color: #ffd700;
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 8px;
}

.manual-desc {
    color: #aaa;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.manual-stats {
    color: #4ecdc4;
    font-size: 0.9em;
}

.manual-info {
    display: flex;
    gap: 15px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.manual-tier {
    color: #4ecdc4;
    font-weight: bold;
}

.manual-rarity {
    font-weight: bold;
}

.manual-efficiency {
    color: #aaa;
}

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

.equipment-slot {
    background: rgba(0, 0, 0, 0.3);
    border: 2px dashed #555;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.equipment-slot:hover {
    border-color: #4ecdc4;
    border-style: solid;
    background: rgba(78, 205, 196, 0.1);
}

.slot-name {
    color: #888;
    font-size: 0.85em;
    margin-bottom: 8px;
}

.item-name {
    font-weight: bold;
    font-size: 0.95em;
    margin-bottom: 5px;
}

.item-rarity {
    font-size: 0.75em;
    margin-bottom: 5px;
    text-transform: capitalize;
}

.item-stats {
    color: #4ecdc4;
    font-size: 0.85em;
}

/* Equipment Selection Modal */
.equipment-selection {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 60vh;
    overflow-y: auto;
}

.equipment-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #444;
    border-radius: 8px;
    cursor: pointer;
    color: #fff;
    transition: all 0.3s;
    font-family: inherit;
    font-size: 1em;
}

.equipment-option:hover {
    background: rgba(78, 205, 196, 0.1);
    border-color: #4ecdc4;
}

.equipment-option.selected {
    background: rgba(78, 205, 196, 0.2);
    border-color: #4ecdc4;
}

.equipment-option.unequip {
    border-color: #666;
}

.equipment-option.unequip:hover {
    border-color: #888;
}

.option-name {
    font-weight: bold;
}

.option-rarity {
    font-size: 0.85em;
    text-transform: capitalize;
}

.option-stats {
    color: #4ecdc4;
}

.equipped-badge {
    background: #4ecdc4;
    color: #000;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: bold;
}

.no-items {
    text-align: center;
    color: #888;
    padding: 20px;
}

.btn-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.btn-info:hover {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
}

@media (max-width: 768px) {
    .disciple-stats-grid,
    .talent-grid,
    .equipment-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cultivation-manual-row {
        flex-direction: column;
    }

    .manual-select {
        width: 100%;
    }
}

/* Buildings Modal */
.buildings-modal {
    color: #fff;
}

.buildings-resources {
    display: flex;
    gap: 30px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.buildings-grid {
    max-height: calc(85vh - 180px);
    overflow-y: auto;
}

.building-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.building-card.max-level {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

.building-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.building-icon {
    font-size: 1.5em;
}

.building-name {
    font-size: 1.1em;
    font-weight: bold;
    color: #ffd700;
}

.building-level {
    color: #4ecdc4;
    font-weight: bold;
}

.building-description {
    color: #aaa;
    font-size: 0.9em;
    line-height: 1.4;
}

.building-effect {
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    font-size: 0.9em;
}

.effect-current {
    color: #4ecdc4;
}

.effect-next {
    color: #ffd700;
    margin-top: 5px;
}

.building-cost {
    display: flex;
    gap: 20px;
    font-size: 0.95em;
    color: #ccc;
}

.max-level-text {
    text-align: center;
    color: #ffd700;
    font-weight: bold;
    padding: 10px;
}

/* Recruitment Modal */
.recruitment-modal {
    color: #fff;
}

.recruitment-info {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.recruitment-info p {
    margin: 10px 0;
    color: #ccc;
}

.recruitment-info .current-stones {
    color: #ffd700;
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 15px;
}

.recruitment-amount {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.recruitment-amount label {
    color: #4ecdc4;
    font-weight: bold;
}

.recruitment-amount input {
    padding: 12px 20px;
    font-size: 1.1em;
    background: rgba(30, 30, 50, 0.9);
    border: 2px solid #4ecdc4;
    border-radius: 8px;
    color: #fff;
    width: 200px;
    text-align: center;
}

.recruitment-amount input:focus {
    outline: none;
    border-color: #ffd700;
}

.recruitment-slider-section {
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

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

.slider-header label {
    color: #ccc;
    font-size: 1em;
}

.percent-display {
    font-size: 1.5em;
    font-weight: bold;
    color: #4ecdc4;
    min-width: 60px;
    text-align: right;
}

.recruit-slider {
    width: 100%;
    height: 12px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #333, #4ecdc4);
    border-radius: 6px;
    outline: none;
    cursor: pointer;
}

.recruit-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #4ecdc4, #45b7aa);
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s;
}

.recruit-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.recruit-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #4ecdc4, #45b7aa);
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    color: #666;
    font-size: 0.85em;
}

.recruitment-actions {
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.recruitment-actions .btn-primary {
    padding: 15px 40px;
    font-size: 1.1em;
    background: linear-gradient(135deg, #4ecdc4, #45b7aa);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.recruitment-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(78, 205, 196, 0.4);
}

.recruitment-actions .btn-cancel {
    padding: 15px 40px;
    font-size: 1.1em;
    background: linear-gradient(135deg, #666, #555);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.recruitment-actions .btn-cancel:hover {
    background: linear-gradient(135deg, #777, #666);
    transform: translateY(-2px);
}

/* Candidates Screen */
.candidates-header {
    text-align: center;
    margin-bottom: 20px;
}

.candidates-header h3 {
    color: #ffd700;
    font-size: 1.4em;
    margin-bottom: 10px;
}

.candidates-header p {
    color: #ccc;
    margin: 5px 0;
}

.candidates-hint {
    color: #4ecdc4 !important;
    font-style: italic;
}

.candidates-grid {
    /* Let modal handle scrolling */
}

.candidate-card {
    text-align: center;
    transition: all 0.3s;
}

.candidate-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.4);
}

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

.candidate-name {
    font-size: 1.1em;
    font-weight: bold;
}

.candidate-weapon {
    font-size: 1.3em;
}

.candidate-rarity {
    font-size: 1em;
    font-weight: bold;
    margin-bottom: 5px;
}

.candidate-weapon-name {
    color: #888;
    font-size: 0.85em;
    margin-bottom: 10px;
}

.candidate-multipliers {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 10px 0;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.mult-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mult-label {
    font-size: 0.75em;
    color: #888;
}

.mult-value {
    font-weight: bold;
    color: #ccc;
}

.mult-value.high {
    color: #4caf50;
}

.mult-value.low {
    color: #ff6b6b;
}

/* Talent Distribution Bars */
.candidate-talents,
.disciple-talents {
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    margin: 8px 0;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.candidate-talent-points,
.disciple-talent-points {
    text-align: center;
    font-size: 0.85em;
    color: #aaa;
    margin: 4px 0;
}

.talent-bar-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    margin: 3px 0;
    font-size: 0.8em;
}

.talent-label {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Candidate Subtalents (Alchemy & Forge) */
.candidate-subtalents {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 8px 0;
    padding: 6px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.subtalent-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9em;
}

.subtalent-item .subtalent-icon {
    font-size: 1.1em;
}

.subtalent-item .subtalent-pts {
    font-weight: bold;
}

.candidate-cost {
    font-size: 0.85em;
    color: #ffd700;
    margin-top: 10px;
}

.btn-recruit {
    width: 100%;
    margin-top: 12px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #4ecdc4, #45b7aa);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-recruit:hover {
    background: linear-gradient(135deg, #5fd4cc, #4ecdc4);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

.recruited-count {
    color: #4caf50;
    font-weight: bold;
}

.remaining-count {
    color: #ffd700;
    font-weight: bold;
}

.candidates-actions {
    text-align: center;
    margin-top: 20px;
}

.candidates-actions .btn-primary {
    padding: 15px 50px;
    font-size: 1.1em;
    background: linear-gradient(135deg, #4ecdc4, #45b7aa);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.candidates-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(78, 205, 196, 0.4);
}

.btn-secondary {
    padding: 12px 30px;
    background: rgba(100, 100, 100, 0.5);
    border: 2px solid #666;
    border-radius: 8px;
    color: #ccc;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(150, 150, 150, 0.5);
    border-color: #888;
}

/* Rarity Chances Display */
.rarity-chances {
    margin: 20px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(78, 205, 196, 0.3);
}

.rarity-chances-title {
    text-align: center;
    color: #ffd700;
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 15px;
}

.rarity-chances-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rarity-chance-item {
    display: grid;
    grid-template-columns: 120px 1fr 70px;
    align-items: center;
    gap: 10px;
}

.rarity-chance-label {
    font-weight: bold;
    font-size: 0.9em;
    text-transform: capitalize;
}

.rarity-chance-bar-container {
    height: 16px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.rarity-chance-bar {
    height: 100%;
    border-radius: 8px;
    transition: width 0.3s ease, background 0.3s ease;
    box-shadow: 0 0 10px currentColor;
}

.rarity-chance-percent {
    font-weight: bold;
    font-size: 0.9em;
    text-align: right;
}
