body {
    font-family: 'Inter', sans-serif;
    background-color: #010409;
    color: #e6edf3;
}
.main-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}
.sidebar {
    background-color: #0d1117;
    padding: 1.5rem 1rem;
    border-right: 1px solid #21262d;
    display: flex;
    flex-direction: column;
    width: 80px;
    transition: width 0.3s ease;
}
.sidebar:hover {
    width: 240px;
}
.sidebar .nav-text {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.sidebar:hover .nav-text {
    display: inline;
    opacity: 1;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 6px;
    color: #c9d1d9;
    font-weight: 500;
    transition: background-color 0.2s;
    cursor: pointer;
    white-space: nowrap;
}
.nav-link:hover {
    background-color: #161b22;
}
.nav-link.active {
    background-color: #1f6feb;
    color: white;
}
.content-wrapper {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
}
.top-nav {
    background-color: #0d1117;
    padding: 0 1.5rem;
    border-bottom: 1px solid #21262d;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    flex-shrink: 0;
}
.main-content {
    padding: 1.5rem;
    overflow-y: auto;
    flex-grow: 1;
    background-color: #010409;
}
.card {
    background-color: #0d1117;
    border: 1px solid #21262d;
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}
.modern-input, .modern-select, .modern-textarea {
    background-color: #010409;
    border: 1px solid #21262d;
    color: #e6edf3;
    padding: 10px 12px;
    font-size: 0.9rem;
    width: 100%;
    border-radius: 6px;
}
.modern-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23c9d1d9' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
}
.modern-textarea {
    min-height: 100px;
}
.modern-input:focus, .modern-select:focus, .modern-textarea:focus {
    outline: none;
    border-color: #1f6feb;
    box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.3);
}
.modern-btn {
    background-color: #238636;
    color: white;
    font-weight: 600;
    padding: 10px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.modern-btn.danger { background-color: #da3633; }
.modern-btn.secondary { background-color: #21262d; }
.player-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}
.player-card { 
    cursor: pointer; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease-in-out;
}
.player-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(1, 4, 9, 0.4);
}
.player-skin {
    width: 40px; height: 40px; border-radius: 6px;
    image-rendering: pixelated;
}

/* Updated Tag Styles */
.tag {
    padding: 5px 12px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    transition: all 0.2s ease-in-out;
}
.tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}
.tag .material-symbols-outlined {
    font-size: 1.1rem;
    font-variation-settings: 'FILL' 1;
}

/* Government Role Tags */
.tag.tag-owner {
    background-image: linear-gradient(45deg, #FBBF24, #F59E0B);
    border-color: #FBBF24;
    color: #422006;
}
.tag.tag-judge {
    background-image: linear-gradient(45deg, #A78BFA, #7C3AED);
    border-color: #A78BFA;
    color: white;
}
.tag.tag-president {
    background-image: linear-gradient(45deg, #60A5FA, #2563EB);
    border-color: #60A5FA;
    color: white;
}
.tag.tag-guardian {
    background-image: linear-gradient(45deg, #34D399, #059669);
    border-color: #34D399;
    color: white;
}
.tag.tag-sheriff {
    background-image: linear-gradient(45deg, #C084FC, #9333EA);
    border-color: #C084FC;
    color: white;
}
.tag.tag-admin {
    background-image: linear-gradient(45deg, #F87171, #DC2626);
    border-color: #F87171;
    color: white;
}
.tag.tag-private {
    background-image: linear-gradient(45deg, #9CA3AF, #4B5563);
    border-color: #9CA3AF;
    color: white;
}
.tag.tag-liquidated {
    background-image: linear-gradient(45deg, #4B5563, #1F2937);
    border-color: #6B7280;
    color: #E5E7EB;
}

/* Wealth Tier Tags */
.tag.debt { 
    background: linear-gradient(45deg, #6e2a2a, #a33a38);
    color: white; 
    border-color: #da3633;
}
.tag.poor { 
    background-color: #5c4033; /* Dark brown */
    background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%239C6644' fill-opacity='0.4' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 6V5zM6 5v1H5z'/%3E%3C/g%3E%3C/svg%3E");
    color: #e0ddd1; 
    border-color: #7a5c4f;
}
.tag.lower-class { 
    background: linear-gradient(45deg, #b8661e, #d88a4b);
    color: white; 
    border-color: #e67e22;
}
.tag.middle-class { 
    background: linear-gradient(45deg, #1c6a2a, #28923a); 
    color: white; 
    border-color: #238636;
}
.tag.upper-class { 
    background: linear-gradient(45deg, #1a5aa3, #2a7ce8);
    color: white;
    border-color: #1f6feb;
}
.tag.high-class { 
    background: linear-gradient(45deg, #5c3a99, #8a63d2);
    color: white;
    border-color: #a78bfa;
}
.tag.rich-af {
    background: linear-gradient(45deg, #8a2be2, #ff8c00, #ffd700);
    color: white;
    font-weight: bold;
    border: 1px solid #ffd700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
}

/* Item Rarity Tags */
.market-card-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.rarity-common { background-color: #6c757d; color: white; }
.rarity-uncommon { background-color: #28a745; color: white; }
.rarity-rare { background-color: #007bff; color: white; }
.rarity-legendary { background-color: #6f42c1; color: white; }
.rarity-mythic { background: linear-gradient(45deg, #ff8c00, #ffd700); color: black; }

.market-card > * {
    position: relative;
    z-index: 1;
}

.modal-backdrop {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(1, 4, 9, 0.8);
    display: flex; justify-content: center; align-items: center;
    z-index: 1000;
}
.login-card {
    width: 90%; max-width: 400px;
}
.hidden { display: none; }
.toggle-checkbox {
    appearance: none;
    width: 40px;
    height: 20px;
    background-color: #30363d;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s;
}
.toggle-checkbox::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: white;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
}
.toggle-checkbox:checked {
    background-color: #238636;
}
.toggle-checkbox:checked::before {
    transform: translateX(20px);
}
.scrollable-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px; /* For scrollbar */
}
.formula-box {
    background-color: #010409;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #21262d;
    font-family: monospace;
    color: #c9d1d9;
}
.collection-dependency-section {
    display: none;
}
.collection-dependency-section.visible {
    display: grid;
}

/* Admin Panel Tabs */
.admin-tabs {
    display: flex;
    border-bottom: 1px solid #21262d;
    margin-bottom: 1rem;
}
.admin-tab-btn {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border: none;
    background: none;
    color: #8b949e;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.admin-tab-btn.active {
    color: #e6edf3;
    border-bottom-color: #1f6feb;
}
.admin-tab-content {
    display: none;
}
.admin-tab-content.active {
    display: block;
}

/* Liquidation and Inheritance Styles */
.player-card.liquidated {
    opacity: 0.5;
    filter: grayscale(1);
    cursor: not-allowed;
}
.player-card.liquidated:hover {
    transform: none;
    box-shadow: none;
}
.inheritance-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(35, 134, 54, 0.1);
    border: 1px solid rgba(35, 134, 54, 0.3);
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
}
.inheritance-card .material-symbols-outlined {
    color: #238636;
    font-size: 1.25rem;
}

/* Inline Asset Editing */
.asset-row .asset-actions { display: block; }
.asset-row .asset-edit-form { display: none; }
.asset-row.is-editing .asset-actions { display: none; }
.asset-row.is-editing .asset-edit-form { display: flex; gap: 0.5rem; }
.asset-row.is-editing .asset-count { display: none; }
.inline-asset-qty-input { width: 80px; padding: 4px 8px; }
