* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow: hidden;
    background: #0a0a1a;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #e0e0e0;
}

.screen {
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
}

/* Auth Screen */
#auth-screen {
    background: linear-gradient(135deg, #0a1628 0%, #1a2a4a 50%, #0d2818 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 40px;
    width: 400px;
    text-align: center;
}

.game-title {
    font-size: 2.5em;
    color: #7fdbca;
    margin-bottom: 5px;
    text-shadow: 0 0 30px rgba(127,219,202,0.3);
}

.subtitle {
    color: #888;
    margin-bottom: 30px;
    font-style: italic;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #aaa;
    cursor: pointer;
    transition: all 0.2s;
}

.tab.active {
    background: rgba(127,219,202,0.15);
    border-color: #7fdbca;
    color: #7fdbca;
}

.auth-form input {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 14px;
    outline: none;
}

.auth-form input:focus {
    border-color: #7fdbca;
}

.auth-form button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #2d8a6e, #7fdbca);
    border: none;
    border-radius: 8px;
    color: #0a1628;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s;
}

.auth-form button:hover {
    transform: scale(1.02);
}

.error {
    color: #ff6b6b;
    margin-top: 10px;
    font-size: 14px;
}

.success {
    color: #4CAF50;
    margin-top: 10px;
    font-size: 14px;
}

.auth-link {
    color: #64b5f6;
    cursor: pointer;
    font-size: 13px;
    margin-top: 10px;
    text-decoration: underline;
}

.auth-link:hover {
    color: #90caf9;
}

.hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

.share-btn {
    margin-top: 20px;
    padding: 10px 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #aaa;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.share-btn:hover {
    background: rgba(127,219,202,0.15);
    border-color: #7fdbca;
    color: #7fdbca;
}

/* Confirm Modal */
.game-confirm-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: confirmFadeIn 0.2s ease;
}
@keyframes confirmFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.game-confirm-box {
    background: linear-gradient(160deg, #1a2a3a 0%, #0d1820 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 28px 32px;
    min-width: 340px;
    max-width: 440px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 60px rgba(100, 200, 255, 0.05);
    animation: confirmSlideIn 0.25s ease;
}
@keyframes confirmSlideIn {
    from { transform: translateY(-20px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
.game-confirm-icon {
    font-size: 36px;
    margin-bottom: 8px;
}
.game-confirm-title {
    font-size: 18px;
    font-weight: 600;
    color: #e8e8e8;
    margin-bottom: 10px;
}
.game-confirm-message {
    font-size: 13px;
    color: #9ab;
    line-height: 1.5;
    margin-bottom: 22px;
}
.price-input {
    display: block;
    margin: 12px auto 0;
    width: 120px;
    padding: 8px 12px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.4);
    color: #fff;
    outline: none;
}
.price-input:focus {
    border-color: #9b59b6;
    box-shadow: 0 0 8px rgba(155,89,182,0.4);
}
.game-confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.game-confirm-btn {
    padding: 10px 28px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}
.confirm-yes {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: #fff;
    border-color: rgba(231, 76, 60, 0.4);
}
.confirm-yes:hover {
    background: linear-gradient(135deg, #e74c3c, #ff6b5a);
    box-shadow: 0 0 16px rgba(231, 76, 60, 0.3);
}
.confirm-no {
    background: rgba(255,255,255,0.05);
    color: #aaa;
}
.confirm-no:hover {
    background: rgba(255,255,255,0.1);
    color: #e0e0e0;
}

/* Game Canvas */
#game-canvas {
    width: 100vw;
    height: 100vh;
    display: block;
    cursor: grab;
}

#game-canvas:active {
    cursor: grabbing;
}

/* HUD */
#hud {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    z-index: 100;
}

.hud-left, .hud-right {
    display: flex;
    gap: 15px;
    align-items: center;
    pointer-events: auto;
}

.hud-item {
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.hud-icon {
    font-size: 18px;
}

.hud-label {
    color: #888;
    font-size: 11px;
}

.hud-btn {
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 10px 16px;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.hud-btn:hover {
    background: rgba(127,219,202,0.2);
    border-color: #7fdbca;
}

.hud-btn-danger {
    border-color: rgba(255,68,68,0.3);
}

.hud-btn-danger:hover {
    background: rgba(255,68,68,0.2);
    border-color: #ff4444;
}

.hud-time {
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 13px;
    color: #e0e0e0;
}

/* Panels */
.panel {
    position: fixed;
    right: 20px;
    top: 70px;
    width: 380px;
    max-height: calc(100vh - 100px);
    background: rgba(15,20,35,0.92);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 15px;
    overflow-y: auto;
    z-index: 200;
}

.panel-wide {
    width: 450px;
}

.panel-left {
    right: auto;
    left: 20px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.panel-header h3 {
    font-size: 16px;
    color: #7fdbca;
}

.close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover {
    color: #ff6b6b;
}

#inspector-preview {
    width: 100%;
    height: 160px;
    background: radial-gradient(ellipse at center, rgba(127,219,202,0.08) 0%, rgba(0,0,0,0.3) 100%);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: relative;
    overflow: hidden;
}
#inspector-preview-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.panel-tabs {
    display: flex;
    padding: 10px 15px 0;
    gap: 8px;
}

.panel-tabs .tab {
    font-size: 13px;
    padding: 8px 12px;
}

.panel-hint {
    padding: 10px 18px;
    color: #666;
    font-size: 12px;
    font-style: italic;
}

/* Placement List */
.placement-list {
    padding: 10px 15px;
}

.placement-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 6px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.placement-item:hover {
    background: rgba(127,219,202,0.1);
    border-color: rgba(127,219,202,0.3);
}

.placement-item.selected {
    background: rgba(127,219,202,0.2);
    border-color: #7fdbca;
}

.placement-item .item-info {
    display: flex;
    flex-direction: column;
}

.placement-item .item-name {
    font-weight: 600;
    font-size: 14px;
}

.placement-item .item-biome {
    font-size: 11px;
    color: #888;
}

.placement-item .item-diet {
    font-size: 10px;
    color: #7fdbca;
    opacity: 0.8;
}

.placement-item .item-cost {
    color: #7fdbca;
    font-weight: bold;
    font-size: 14px;
}

/* Inspector */
#inspector-content {
    padding: 15px 18px;
}

.inspector-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.inspector-row .label {
    color: #888;
    font-size: 13px;
}

.inspector-row .value {
    font-weight: 600;
    font-size: 13px;
}

.gene-bar {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 3px;
}

.gene-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
}

.gene-speed .gene-bar-fill { background: #4ecdc4; }
.gene-health .gene-bar-fill { background: #ff6b6b; }
.gene-stamina .gene-bar-fill { background: #ffd93d; }
.gene-hunger .gene-bar-fill { background: #6bcb77; }
.gene-thirst .gene-bar-fill { background: #4d96ff; }

.gene-section {
    margin-top: 10px;
}

.gene-item {
    margin-bottom: 8px;
}

.gene-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 2px;
}

/* Biome Indicator */
#biome-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 10px 24px;
    z-index: 100;
    font-size: 16px;
    font-weight: 600;
    color: #e0e0e0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Action Button */
.action-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #2d8a6e, #7fdbca);
    border: none;
    border-radius: 8px;
    color: #0a1628;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    transition: transform 0.1s;
}

.action-btn:hover {
    transform: scale(1.02);
}

.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

#prestige-content {
    padding: 15px 18px;
}

#prestige-content p {
    font-size: 13px;
    color: #aaa;
    margin-bottom: 10px;
}

/* Marketplace */
.marketplace-section {
    padding: 10px 15px;
}

.market-filters {
    margin-bottom: 10px;
}

.market-filters select {
    width: 100%;
    padding: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 13px;
}

.market-list {
    max-height: 400px;
    overflow-y: auto;
}

.market-listing {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.market-listing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.market-listing-header .species {
    font-weight: 600;
    font-size: 14px;
}

.market-listing-header .price {
    color: #7fdbca;
    font-weight: bold;
}

.market-listing-meta {
    font-size: 11px;
    color: #888;
    margin-bottom: 6px;
}

.market-listing-genes {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 11px;
}

.market-listing-genes span {
    background: rgba(255,255,255,0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

.market-buy-btn {
    width: 100%;
    padding: 6px;
    margin-top: 8px;
    background: rgba(127,219,202,0.2);
    border: 1px solid rgba(127,219,202,0.4);
    border-radius: 6px;
    color: #7fdbca;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.market-buy-btn:hover {
    background: rgba(127,219,202,0.35);
}

.market-buy-btn.delist-btn {
    background: rgba(231,76,60,0.15);
    border-color: rgba(231,76,60,0.4);
    color: #e74c3c;
}
.market-buy-btn.delist-btn:hover {
    background: rgba(231,76,60,0.3);
}

.own-listing {
    border-left: 3px solid #9b59b6;
}

.market-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.market-filters select {
    flex: 1;
    padding: 6px 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #ccc;
    font-size: 12px;
}

/* Prestige tiers */
.prestige-tier {
    padding: 6px 10px;
    margin-bottom: 4px;
    font-size: 12px;
    color: #666;
    border-radius: 6px;
    background: rgba(255,255,255,0.02);
}

.prestige-tier.unlocked {
    color: #7fdbca;
    background: rgba(127,219,202,0.1);
}

.prestige-stats {
    margin: 10px 0;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 8px 12px;
}

/* Clickable HUD items */
.hud-item.clickable {
    cursor: pointer;
    transition: all 0.2s;
}

.hud-item.clickable:hover {
    background: rgba(127,219,202,0.15);
    border-color: #7fdbca;
}

/* Entity List */
.entity-list {
    max-height: 450px;
    overflow-y: auto;
    padding: 8px 12px;
}

.entity-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    margin-bottom: 6px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.entity-list-item:hover {
    background: rgba(127,219,202,0.1);
    border-color: rgba(127,219,202,0.3);
}

.entity-list-item.dead {
    opacity: 0.4;
}

.entity-list-item .entity-info {
    flex: 1;
}

.entity-list-item .entity-name {
    font-weight: 600;
    font-size: 14px;
    display: block;
}

.entity-list-item .entity-meta {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

.entity-list-item .entity-status {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    background: rgba(127,219,202,0.15);
    color: #7fdbca;
}

.entity-list-item .entity-status.hunting {
    background: rgba(255,100,100,0.15);
    color: #ff6b6b;
}

.entity-list-item .entity-status.fleeing {
    background: rgba(255,200,50,0.15);
    color: #ffc832;
}

.entity-list-item .follow-btn {
    padding: 4px 10px;
    margin-left: 8px;
    background: rgba(127,219,202,0.2);
    border: 1px solid rgba(127,219,202,0.4);
    border-radius: 6px;
    color: #7fdbca;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.entity-list-item .follow-btn:hover {
    background: rgba(127,219,202,0.4);
}

/* Stat Bars */
.stat-bars {
    margin: 10px 0;
}

.stat-bar-item {
    margin-bottom: 6px;
}

.stat-bar-header {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #aaa;
    margin-bottom: 2px;
}

.stat-bar-track {
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Food chain tags */
.food-chain-section {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 6px;
}

.food-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.food-tag {
    padding: 2px 8px;
    background: rgba(127,219,202,0.1);
    border: 1px solid rgba(127,219,202,0.2);
    border-radius: 12px;
    font-size: 11px;
    color: #7fdbca;
}

.food-tag.predator {
    background: rgba(255,100,100,0.1);
    border-color: rgba(255,100,100,0.2);
    color: #ff6b6b;
}

/* Action button small */
.action-btn.small {
    padding: 6px 12px;
    font-size: 12px;
}

/* Settings panel */
#settings-panel {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 100;
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
}

.settings-row label {
    color: #aaa;
}

.settings-row input[type="range"] {
    width: 100px;
    accent-color: #7fdbca;
}

.settings-row input[type="checkbox"] {
    accent-color: #7fdbca;
}

.settings-row select {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    color: #eee;
    padding: 4px 8px;
    font-size: 12px;
}

/* Search input */
.search-input {
    width: 100%;
    padding: 8px 12px;
    margin: 8px 0;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #eee;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
}

.search-input:focus {
    border-color: rgba(127,219,202,0.4);
}

.search-input::placeholder {
    color: #666;
}

.filter-select {
    flex: 1;
    padding: 6px 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #eee;
    font-size: 12px;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 24px;
}

.filter-select:focus {
    border-color: rgba(127,219,202,0.4);
}

.filter-select option {
    background: #1a1a2e;
    color: #eee;
}

.clear-filters-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #aaa;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.clear-filters-btn:hover {
    background: rgba(255,100,100,0.15);
    border-color: rgba(255,100,100,0.4);
    color: #ff6666;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.status-alive { background: rgba(107,203,119,0.2); color: #6bcb77; }
.status-dead { background: rgba(255,107,107,0.2); color: #ff6b6b; }
.status-growing { background: rgba(255,217,61,0.2); color: #ffd93d; }
.status-mature { background: rgba(78,205,196,0.2); color: #4ecdc4; }
.status-seeding { background: rgba(77,150,255,0.2); color: #4d96ff; }

/* Scrollbar */
.panel::-webkit-scrollbar {
    width: 6px;
}
.panel::-webkit-scrollbar-track {
    background: transparent;
}
.panel::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10,10,26,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    font-size: 20px;
    color: #7fdbca;
}

/* Tooltip for placement mode */
#placement-cursor {
    position: fixed;
    pointer-events: none;
    background: rgba(127,219,202,0.9);
    color: #0a1628;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    z-index: 300;
    display: none;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: rgba(15,20,35,0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 12px 20px;
    color: #e0e0e0;
    font-size: 14px;
    pointer-events: auto;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 3.7s forwards;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.toast.toast-success {
    border-color: rgba(127,219,202,0.5);
    color: #7fdbca;
}

.toast.toast-error {
    border-color: rgba(255,107,107,0.5);
    color: #ff6b6b;
}

.toast.toast-info {
    border-color: rgba(77,150,255,0.5);
    color: #4d96ff;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-20px); }
}

/* Graveyard Genes */
.graveyard-genes {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 10px;
    margin-top: 4px;
}

.graveyard-genes span {
    background: rgba(255,255,255,0.05);
    padding: 1px 5px;
    border-radius: 4px;
    color: #aaa;
}

/* Settings Panel */
.settings-content {
    padding: 12px;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.settings-section {
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.06);
}

.settings-section-title {
    color: #7fdbca;
    font-size: 12px;
    margin-bottom: 10px;
    font-weight: 600;
}

.settings-action-btn {
    display: block;
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    color: #ddd;
    font-size: 12px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
}
.settings-action-btn:hover {
    background: rgba(127,219,202,0.1);
    border-color: rgba(127,219,202,0.3);
}
.settings-action-btn.settings-danger {
    border-color: rgba(255,100,100,0.2);
}
.settings-action-btn.settings-danger:hover {
    background: rgba(255,100,100,0.1);
    border-color: rgba(255,100,100,0.4);
    color: #ff6666;
}

.settings-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    color: #ccc;
    font-size: 12px;
    cursor: pointer;
}
.settings-toggle input[type="checkbox"] {
    display: none;
}
.toggle-slider {
    width: 36px;
    height: 20px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    position: relative;
    transition: background 0.2s;
}
.toggle-slider::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #aaa;
    top: 2px;
    left: 2px;
    transition: all 0.2s;
}
.settings-toggle input:checked + .toggle-slider {
    background: rgba(127,219,202,0.4);
}
.settings-toggle input:checked + .toggle-slider::after {
    background: #7fdbca;
    left: 18px;
}

.settings-range {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    color: #ccc;
    font-size: 12px;
}
.settings-range input[type="range"] {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    outline: none;
}
.settings-range input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #7fdbca;
    cursor: pointer;
}
.range-value {
    min-width: 16px;
    text-align: center;
    color: #7fdbca;
    font-weight: 600;
}

/* Wiki Styles */
.wiki-section {
    margin-bottom: 8px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
}

.wiki-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(255,255,255,0.04);
    color: #ddd;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin: 0;
}
.wiki-title:hover {
    background: rgba(127,219,202,0.08);
}

.wiki-arrow {
    color: #7fdbca;
    font-size: 12px;
}

.wiki-body {
    padding: 12px 14px;
    background: rgba(0,0,0,0.2);
}

.wiki-body p {
    color: #bbb;
    font-size: 12px;
    line-height: 1.6;
    margin-bottom: 8px;
}
.wiki-body p:last-child {
    margin-bottom: 0;
}

.wiki-body ul {
    list-style: none;
    padding: 0;
    margin: 6px 0;
}

.wiki-body ul li {
    color: #aaa;
    font-size: 12px;
    line-height: 1.6;
    padding: 3px 0 3px 16px;
    position: relative;
}
.wiki-body ul li::before {
    content: '•';
    position: absolute;
    left: 4px;
    color: #7fdbca;
}

.wiki-body b {
    color: #e0e0e0;
}

/* Tutorial Hints */
#tutorial-overlay {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    pointer-events: none;
}

.tutorial-hint {
    background: rgba(15, 20, 40, 0.95);
    border: 1px solid rgba(127, 219, 202, 0.4);
    border-radius: 12px;
    padding: 16px 20px;
    max-width: 400px;
    min-width: 300px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 20px rgba(127,219,202,0.1);
    pointer-events: all;
    animation: hintSlideIn 0.3s ease;
}

@keyframes hintSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.tutorial-hint-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.tutorial-hint-text {
    color: #e0e0e0;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.tutorial-hint-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.tutorial-btn-next {
    padding: 6px 16px;
    background: rgba(127,219,202,0.2);
    border: 1px solid rgba(127,219,202,0.4);
    border-radius: 6px;
    color: #7fdbca;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.tutorial-btn-next:hover {
    background: rgba(127,219,202,0.3);
}

.tutorial-btn-dismiss {
    padding: 6px 12px;
    background: none;
    border: none;
    color: #888;
    font-size: 11px;
    cursor: pointer;
    transition: color 0.2s;
}
.tutorial-btn-dismiss:hover {
    color: #ccc;
}

.tutorial-progress {
    margin-top: 10px;
    display: flex;
    gap: 4px;
    justify-content: center;
}

.tutorial-progress-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transition: background 0.2s;
}
.tutorial-progress-dot.active {
    background: #7fdbca;
}
.tutorial-progress-dot.done {
    background: rgba(127,219,202,0.4);
}
