* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: #090d16;
    background-image: 
        radial-gradient(at 10% 20%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 90% 80%, rgba(168, 85, 247, 0.15) 0px, transparent 50%);
    color: #f3f4f6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    text-align: center;
    background: rgba(17, 24, 39, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    max-width: 1050px;
    width: 100%;
}

h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 50%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

p {
    color: #9ca3af;
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.search-section {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 15px;
}

.search-section input {
    width: 60%;
    padding: 12px 18px;
    font-size: 0.95rem;
    background: rgba(3, 7, 18, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
}

.search-section input:focus {
    border-color: #818cf8;
    box-shadow: 0 0 15px rgba(129, 140, 248, 0.25);
}

.search-section button, #generate-btn {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.search-section button:hover, #generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

/* Área de Carga / Zona de Imagen con Iconos */
.image-upload-section {
    margin-bottom: 25px;
}

.upload-btn {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    padding: 14px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px dashed rgba(16, 185, 129, 0.4);
    text-align: center;
}

.upload-btn span {
    display: block;
    font-size: 0.8rem;
    color: #6ee7b7;
    margin-top: 4px;
    font-weight: normal;
}

.upload-btn:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: #34d399;
    box-shadow: 0 0 15px rgba(52, 211, 153, 0.2);
}

.image-preview-container {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: rgba(3, 7, 18, 0.5);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

#image-preview {
    max-width: 140px;
    max-height: 90px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Botón Tecnológico para Quitar Imagen */
.remove-img-btn {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.remove-img-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

/* Cuadrícula de Paleta */
.palette-container {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 12px;
    margin: 30px 0;
}

.color-box {
    height: 200px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 12px;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.color-box:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.4);
}

.color-box span {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #f8fafc;
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    max-height: 75px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: 0.5px;
}

#generate-btn {
    width: 100%;
    max-width: 320px;
    padding: 14px;
    font-size: 1rem;
    margin: 0 auto;
}

/* Responsivo */
@media (max-width: 950px) {
    .palette-container {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 550px) {
    .search-section {
        flex-direction: column;
    }
    .search-section input {
        width: 100%;
    }
    .palette-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .color-box span {
        writing-mode: horizontal-tb;
        transform: none;
        font-size: 0.85rem;
    }
}