.palette-tool-main {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* --- INPUT Y PREVIEW --- */
.input-section {
    background: #0a0a0a;
    border: 1px solid #222;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    margin-bottom: 40px;
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 40px;
    border: 2px dashed #333;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #888;
}

.file-label:hover {
    border-color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.02);
    color: white;
}

.file-label .icon {
    font-size: 2rem;
}

.image-preview-container {
    margin-top: 20px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #333;
    max-height: 300px;
    display: flex;
    justify-content: center;
    background-color: #000;
}

.image-preview-container img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

/* --- GRID DE COLORES --- */
.palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Tarjeta de Color Individual */
.color-card {
    background: #111;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #222;
    position: relative;
}

.color-card:hover {
    transform: translateY(-5px);
    border-color: white;
}

.color-sample {
    height: 100px;
    width: 100%;
    transition: filter 0.2s;
}

.color-info {
    padding: 15px;
    text-align: center;
}

.color-hex {
    font-family: monospace;
    font-size: 1rem;
    color: white;
    font-weight: 700;
    display: block;
}

.copy-hint {
    font-size: 0.7rem;
    color: #666;
    margin-top: 5px;
    display: block;
    text-transform: uppercase;
}

/* Animación al copiar */
.color-card.copied {
    border-color: #28a745;
}
.color-card.copied .copy-hint {
    color: #28a745;
    font-weight: bold;
}

/* Responsividad */
@media (max-width: 600px) {
    .palette-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en móvil */
    }
}