/* Tier Maker Specific Styles */
.settings-panel {
    width: 380px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--accent-color);
    background: rgba(56, 189, 248, 0.1);
}

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

/* Custom scrollbar for list */
.image-list-container::-webkit-scrollbar { width: 6px; }
.image-list-container::-webkit-scrollbar-track { background: transparent; }
.image-list-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }

.image-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid rgba(255,255,255,0.05);
}

.image-thumb {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    background: #000;
}

.image-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.rank-select {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
}

.rank-select option {
    background: #0F172A;
    color: #fff;
}

/* ====== Tier Board ====== */
.tier-board-container {
    padding: 20px;
    background: #0f1115; /* Sligtly darker board bg */
    border-radius: 12px;
    border: 2px solid #333;
    min-height: 500px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    position: relative;
    overflow: hidden;
}

/* Camera Shake on Impact */
@keyframes shakeImpact {
    0% { transform: translate(0, 0) rotate(0deg); }
    10% { transform: translate(-5px, 5px) rotate(-0.5deg); }
    20% { transform: translate(5px, -3px) rotate(0.5deg); }
    30% { transform: translate(-3px, 2px) rotate(0deg); }
    40% { transform: translate(2px, -1px) rotate(0deg); }
    50% { transform: translate(-1px, 1px) rotate(0deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

.shake-active {
    animation: shakeImpact 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

.board-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 25px;
    color: #fff;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.tier-row {
    display: flex;
    min-height: 100px;
    margin-bottom: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #2a2a2a;
}

.tier-label {
    width: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: 900;
    color: #000;
    text-shadow: 0 1px 2px rgba(255,255,255,0.3);
    border-right: 2px solid #111;
    flex-shrink: 0;
}

.tier-content {
    flex-grow: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    align-content: flex-start;
}

.tier-image-box {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    border: 3px solid #444;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    position: relative;
    /* Default Hidden before animation */
    opacity: 0;
}

.tier-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* The majestic "THUD" animation */
@keyframes stampDrop {
    0% {
        opacity: 0;
        transform: scale(4) translateY(-100px) rotate(15deg);
        filter: blur(10px);
    }
    60% {
        opacity: 1;
        transform: scale(0.9) translateY(0) rotate(-2deg);
        filter: blur(0px);
    }
    80% {
        transform: scale(1.05) translateY(0) rotate(0deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0) rotate(0deg);
    }
}

.anim-drop-impact {
    animation: stampDrop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Remove Delete Btn */
.btn-remove-sm {
    background: transparent;
    border: none;
    color: var(--danger);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 5px;
    border-radius: 4px;
}
.btn-remove-sm:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ====== NEW: Image Shape Overrides ====== */
.tier-board-container.shape-rounded .tier-image-box {
    border-radius: 20px;
}

.tier-board-container.shape-circle .tier-image-box {
    border-radius: 50%;
}

/* ====== NEW: Layout Mode: Vertical (Kanban) ====== */
.tier-rows-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.layout-vertical .tier-rows-wrapper {
    flex-direction: row;
    align-items: stretch;
    gap: 10px;
}

.layout-vertical .tier-row {
    flex-direction: column;
    flex: 1 1 0; /* evenly divide space */
    min-width: 120px;
    margin-bottom: 0;
}

.layout-vertical .tier-label {
    width: 100%;
    min-height: 50px;
    height: auto;
    border-right: none;
    border-bottom: 2px solid #111;
    font-size: 1.5rem; /* slightly smaller for columns */
    padding: 10px;
}

.layout-vertical .tier-content {
    flex-direction: column;
    align-items: center;
}
