body {
    background: linear-gradient(135deg, #1a0b2e 0%, #24083c 100%);
    color: #ffffff;
    min-height: 100vh;
    padding: 2rem 0;
}

.container-fluid {
    max-width: 1600px;
}

.config-panel, .wheel-container, .config-section {
    background: linear-gradient(160deg, rgba(41, 15, 66, 0.9) 0%, rgba(26, 11, 46, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 
                0 2px 8px rgba(0, 0, 0, 0.1);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
}

.space-item {
    background: linear-gradient(160deg, rgba(45, 19, 71, 0.95) 0%, rgba(33, 14, 52, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.space-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

h2, h4 {
    font-weight: 600;
    color: #fff;
    margin-bottom: 1.5rem;
}

.form-control {
    background: rgba(41, 15, 66, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-control:focus {
    background: rgba(51, 19, 82, 0.8);
    border-color: rgba(147, 51, 234, 0.5);
    box-shadow: 0 0 0 2px rgba(147, 51, 234, 0.25), 
                0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn {
    transition: all 0.2s ease;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(45deg, #9333ea 0%, #c026d3 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(45deg, #8b5cf6 0%, #d946ef 100%);
    border: none;
}

.btn-primary:hover, .btn-success:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
}

#wheelCanvas {
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2));
}

.wheel-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.wheel-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#wheelCanvas {
    position: relative;
    width: 100%;
    height: auto;
    z-index: 0;
}

#spinButton {
    position: static;
    transform: none;
    margin-top: 1rem;
}

.space-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: #2d2d2d;
    border: 1px solid #404040;
    margin-bottom: 0.5rem;
    border-radius: 0.25rem;
    color: #ffffff;
}

.space-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.space-handle {
    cursor: move;
    padding: 0.5rem;
    color: #999;
}

.space-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: start;
}

.bias-controls {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 0 0.5rem;
}

.bias-controls .form-range {
    width: 100%;
    min-width: 200px;
}

.bias-controls .bias-number {
    width: 80px;
}

.btn-delete {
    align-self: flex-start;
}

.space-item input {
    margin-right: 0.5rem;
}

#exportedConfig {
    background: linear-gradient(160deg, rgba(41, 15, 66, 0.6) 0%, rgba(26, 11, 46, 0.6) 100%);
    padding: 1rem;
    border-radius: 0.25rem;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    margin-top: 1rem;
    font-family: monospace;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.config-section {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}

.wheel-arrow {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid;
    background: linear-gradient(to bottom, #d946ef, #9333ea);
    filter: drop-shadow(0 4px 8px rgba(147, 51, 234, 0.3));
    transform: translate(-50%, -50%);
    transform-origin: center;
    z-index: 1;
    pointer-events: none;
}

.wheel-arrow:after {
    content: '';
    position: absolute;
    left: -21px;
    top: -41px;
    border-left: 21px solid transparent;
    border-right: 21px solid transparent;
    border-top: 41px solid #000;
    z-index: -1;
    opacity: 0.5;
}

.color-control {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.color-header {
    font-size: 0.9rem;
    padding: 0 0.5rem;
}

.color-header span {
    font-weight: 500;
    color: #888;
}

.color-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.5rem;
}

.color-inputs input[type="color"] {
    width: 40px;
    padding: 2px;
}

.color-control input[type="checkbox"] {
    margin-right: 0.5rem;
}

.color-control input[type="color"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.color-control input[type="color"] {
    width: 40px;
    padding: 2px;
}

.form-control {
    background-color: #333;
    border-color: #404040;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-control:focus {
    background-color: #404040;
    border-color: #505050;
    color: #ffffff;
    box-shadow: 0 0 0 2px rgba(68, 68, 187, 0.25), 
                0 4px 8px rgba(0, 0, 0, 0.15);
}

.form-control:disabled {
    background-color: #252525;
    color: #888;
}

.form-label {
    color: #ffffff;
}

.form-check-label {
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.form-range::-webkit-slider-runnable-track {
    background-color: #404040;
}

.form-range::-webkit-slider-thumb {
    background-color: #ffffff;
}

.btn-primary {
    background: linear-gradient(45deg, #9333ea 0%, #c026d3 100%);
    border: none;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-success {
    background: linear-gradient(45deg, #8b5cf6 0%, #d946ef 100%);
    border: none;
}

select.form-control option {
    background-color: #333;
    color: #ffffff;
}

.bias-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bias-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    padding: 0 0.5rem;
}

.bias-header span:first-child {
    font-weight: 500;
    color: #888;
}

.bias-header span:last-child {
    font-style: italic;
    color: #aaa;
    font-size: 0.85em;
}

.rarity-label {
    color: #aaa !important;
}

.config-panel {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 8px;
    height: 100%;
    min-width: 600px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 
                0 2px 8px rgba(0, 0, 0, 0.1);
}

.spaces-container {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    margin-top: 20px;
}

.spaces-container h4 {
    margin: 0;
}

.button-group {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.form-check {
    margin: 0;
}

.share-link {
    font-family: monospace;
    font-size: 0.875rem;
}

.share-link a {
    word-break: break-all;
    color: inherit;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
}

.form-select {
    background-color: rgba(41, 15, 66, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.form-select:focus {
    background-color: rgba(51, 19, 82, 0.8);
    border-color: rgba(147, 51, 234, 0.5);
    box-shadow: 0 0 0 2px rgba(147, 51, 234, 0.25);
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ...existing code... */

/* Drag and drop styling improvements */
.sortable-ghost {
    opacity: 0.4;
}

.sortable-drag {
    opacity: 0.9;
    transform: rotate(2deg);
    cursor: grabbing;
}

.sortable-chosen {
    background: linear-gradient(160deg, rgba(65, 29, 101, 0.95) 0%, rgba(53, 24, 82, 0.95) 100%);
}

.sortable-fallback {
    opacity: 1 !important;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

/* Prevent other spaces from moving during drag */
#spacesList {
    position: relative;
}

.space-item {
    position: relative;
    z-index: 1;
    /* ...existing space-item styles... */
}

.space-handle {
    cursor: grab;
    /* ...existing space-handle styles... */
}

.space-handle:active {
    cursor: grabbing;
}

/* ...existing code... */

/* Theme color input adjustments */
#themeColor {
    width: 100%;
    height: 38px;
    padding: 3px 6px;
}

.modal-content {
    background: linear-gradient(160deg, rgba(41, 15, 66, 0.95) 0%, rgba(26, 11, 46, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.modal-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

#importInput {
    background: rgba(41, 15, 66, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: monospace;
}

/* ...existing code... */

/* Info icon styles */
.info-icon {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    cursor: help;
    user-select: none;
}

.info-icon:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Make tooltips look nicer */
.tooltip .tooltip-inner {
    background: rgba(26, 11, 46, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    padding: 8px 12px;
    font-size: 0.875rem;
    max-width: 250px;
    white-space: pre-line;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

/* Style tooltip arrow */
.tooltip .tooltip-arrow::before {
    border-right-color: rgba(26, 11, 46, 0.98);
}

/* ...existing code... */

/* ...existing code... */

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.05);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 1);
}

/* ...existing code... */
