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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.header {
    text-align: center;
    padding: 2rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.title {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
}

.main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.upload-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.upload-area {
    background: rgba(255, 255, 255, 0.95);
    border: 3px dashed #ccc;
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.upload-area:hover::before {
    opacity: 1;
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.upload-area:hover {
    border-color: #667eea;
    background: rgba(255, 255, 255, 1);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.upload-area.dragover {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.upload-content {
    position: relative;
    z-index: 1;
}

.upload-icon {
    width: 60px;
    height: 60px;
    color: #667eea;
    margin-bottom: 1rem;
}

.upload-area h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.upload-area p {
    color: #666;
    font-size: 0.9rem;
}

.image-pool {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.image-pool h3 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.3rem;
}

.pool-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 100px;
    padding: 1rem;
    border: 2px dashed #ddd;
    border-radius: 15px;
    background: rgba(248, 249, 250, 0.8);
}

.pool-items.empty::after {
    content: 'Upload images to get started';
    color: #999;
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.tier-list {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.tier-row {
    display: flex;
    margin-bottom: 1rem;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.tier-row:hover {
    transform: translateY(-2px);
}

.tier-label {
    width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.tier-s { background: linear-gradient(135deg, #ff6b6b, #ee5a52); }
.tier-a { background: linear-gradient(135deg, #4ecdc4, #44a08d); }
.tier-b { background: linear-gradient(135deg, #45b7d1, #96c93d); }
.tier-c { background: linear-gradient(135deg, #f7b731, #fc4a1a); }
.tier-d { background: linear-gradient(135deg, #8b5cf6, #667eea); }

.tier-items {
    flex: 1;
    min-height: 100px;
    background: rgba(248, 249, 250, 0.9);
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    align-content: flex-start;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 2px dashed transparent;
    transition: all 0.3s ease;
}

.tier-items.drag-over {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.tier-item {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    cursor: move;
    transition: all 0.3s ease;
    position: relative;
    border: 3px solid transparent;
}

.tier-item:hover {
    transform: scale(1.1);
    z-index: 10;
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.tier-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.tier-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.tier-item:hover img {
    transform: scale(1.05);
}

.controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .upload-section {
        grid-template-columns: 1fr;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .tier-label {
        width: 80px;
        font-size: 1.5rem;
    }
    
    .tier-item {
        width: 60px;
        height: 60px;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
}

