/* Number Pool */
.number-pool {
    background: var(--info-bg);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    transition: background 0.3s ease;
}

.pool-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.pool-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    min-height: 70px;
}

/* Tiles */
.number-tile {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s, opacity 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

.number-tile:hover:not(.used) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.number-tile:active:not(.used) {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.number-tile.used {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Image support for brainrot theme */
.tile-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.image-placeholder {
    font-size: 20px;
    color: white;
}

/* Color Theme Tiles */
.number-tile.color-theme {
    background: var(--tile-color);
}

.number-tile.color-theme.color-1 { --tile-color: #ef4444; } /* Red */
.number-tile.color-theme.color-2 { --tile-color: #22c55e; } /* Green */
.number-tile.color-theme.color-3 { --tile-color: #3b82f6; } /* Blue */
.number-tile.color-theme.color-4 { --tile-color: #eab308; } /* Yellow */
.number-tile.color-theme.color-5 { --tile-color: #a855f7; } /* Purple */

/* Platform */
.platform {
    background: var(--container-bg);
    padding: 20px;
    border: 3px dashed var(--border-color);
    border-radius: 10px;
    margin-bottom: 20px;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.platform-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.platform-slots {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Slots */
.slot {
    width: 60px;
    height: 60px;
    background: var(--info-bg);
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: white;
    transition: all 0.15s;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.slot.empty {
    color: var(--text-tertiary);
}

.slot.filled {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid #667eea;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.slot.filled:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.slot.filled:active {
    transform: scale(0.95);
}

.slot.filled.color-theme {
    background: var(--tile-color);
    border-color: var(--tile-color);
}

/* Drag Ghost */
.drag-ghost {
    position: fixed;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.95;
}

.drag-ghost.color-theme {
    background: var(--tile-color);
}

/* History */
.history {
    margin-top: 30px;
}

.history-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    padding: 10px;
    background: var(--info-bg);
    border-radius: 10px;
    transition: background 0.2s, color 0.3s ease;
}

.history-title:hover {
    background: var(--border-color);
}

.history-toggle-icon {
    font-size: 20px;
    transition: transform 0.3s;
}

.history-toggle-icon.collapsed {
    transform: rotate(-180deg);
}

.history-content {
    max-height: 300px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.history-item {
    background: var(--info-bg);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    animation: slideIn 0.3s ease-out;
    text-align: center;
    transition: background 0.3s ease;
}

.attempt-number {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.feedback-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.feedback-correct {
    color: #4caf50;
}

/* Settings */
.settings-container {
    position: relative;
}

.settings-dropdown {
    position: absolute;
    right: 0;
    top: 40px;
    background: var(--container-bg);
    border-radius: 10px;
    box-shadow: 0 4px 12px var(--shadow-light);
    border: 1px solid var(--border-color);
    padding: 15px;
    min-width: 200px;
    display: none;
    z-index: 100;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.settings-dropdown.show {
    display: block;
}

.settings-section {
    margin-bottom: 15px;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-divider {
    height: 1px;
    background: var(--border-color);
    margin: 15px 0;
    transition: background 0.3s ease;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .number-tile,
    .slot {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .drag-ghost {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .pool-container {
        gap: 8px;
    }

    .number-pool,
    .platform {
        padding: 15px;
    }
}

/* Feedback Message (for hard mode) */
.feedback-message {
    text-align: center;
    margin: 15px 0;
    padding: 15px;
    border-radius: 10px;
    background: var(--info-bg);
    color: var(--text-color);
    font-weight: 600;
    font-size: 16px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.feedback-message:empty {
    display: none;
}

.feedback-message.show {
    animation: slideInFeedback 0.3s ease-out;
}

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

/* Settings Toggles */
.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.settings-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 30px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #667eea;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(30px);
}

/* Toggle with labels */
.toggle-slider .toggle-label-left,
.toggle-slider .toggle-label-right {
    position: absolute;
    font-size: 10px;
    font-weight: 600;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    pointer-events: none;
    transition: opacity 0.3s;
}

.toggle-label-left {
    left: 6px;
}

.toggle-label-right {
    right: 6px;
    opacity: 0.5;
}

.toggle-switch input:checked + .toggle-slider .toggle-label-left {
    opacity: 0.5;
}

.toggle-switch input:checked + .toggle-slider .toggle-label-right {
    opacity: 1;
}

/* Settings label with icon */
.settings-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.settings-label i {
    width: 16px;
    text-align: center;
    color: #667eea;
}