﻿.hidden {
    display: none !important;
}

.tierlist-app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* --- SETUP VIEW --- */
.setup-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.setup-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    animation: popIn 0.3s ease-out;
}

    .setup-card h2 {
        margin-top: 0;
        color: var(--text-main);
    }

    .setup-card p {
        color: var(--text-muted);
        margin-bottom: 1.5rem;
    }

.setup-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

    .setup-form input {
        background: var(--bg-base);
        border: 1px solid var(--border-color);
        color: var(--text-main);
        padding: 1rem;
        border-radius: 8px;
        font-size: 1.1rem;
        outline: none;
        text-align: center;
    }

        .setup-form input:focus {
            border-color: var(--accent);
        }

    .setup-form button {
        background: var(--accent);
        color: #fff;
        border: none;
        padding: 1rem;
        border-radius: 8px;
        font-size: 1.1rem;
        font-weight: bold;
        cursor: pointer;
        transition: filter 0.2s;
    }

        .setup-form button:hover {
            filter: brightness(1.1);
        }

/* --- ACTIVE VIEW --- */
.header-controls h2 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--text-main);
}

.subtitle {
    margin: 0.5rem 0 0 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.tiers-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    margin-top: 1rem;
}

.tier-row {
    display: flex;
    background: var(--bg-base);
    border-radius: 8px;
    overflow: hidden;
    min-height: 80px;
}

.tier-label {
    width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 900;
    color: #111;
    text-shadow: 0px 1px 2px rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.tier-dropzone {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
    transition: background-color 0.2s ease;
}

    .tier-dropzone.drag-over {
        background-color: var(--bg-surface-hover);
    }

.unranked-container {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    margin-top: 1.5rem;
}

.unranked-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

    .unranked-header h3 {
        margin: 0;
        color: var(--text-main);
    }

.add-item-form {
    display: flex;
    gap: 0.5rem;
}

    .add-item-form input {
        background: var(--bg-base);
        border: 1px solid var(--border-color);
        color: var(--text-main);
        padding: 0.5rem 1rem;
        border-radius: 6px;
        outline: none;
        min-width: 250px;
    }

        .add-item-form input:focus {
            border-color: var(--accent);
        }

    .add-item-form button {
        background: var(--accent);
        color: #fff;
        border: none;
        padding: 0.5rem 1rem;
        border-radius: 6px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-weight: 600;
        transition: filter 0.2s;
    }

        .add-item-form button:hover {
            filter: brightness(1.1);
        }

.unranked-dropzone {
    min-height: 120px;
    background: var(--bg-base);
    border-radius: 8px;
    border: 1px dashed var(--border-color);
}

/* Draggable Items */
.tier-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: grab;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    touch-action: none;
}

    .tier-item:active {
        cursor: grabbing;
    }

    .tier-item.is-dragging {
        opacity: 0.4;
        transform: scale(0.95);
    }

@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .tier-label {
        width: 60px;
        font-size: 1.4rem;
    }

    .add-item-form {
        width: 100%;
    }

        .add-item-form input {
            flex: 1;
            min-width: 0;
        }
}
