/* ===================================
   Color Palette - Estilos
   =================================== */

:root {
    --color-primary: #6366f1;
    --color-secondary: #8b5cf6;
    --color-success: #10b981;
    --color-info: #3b82f6;
    --color-danger: #ef4444;
    --color-dark: #1e1b4b;
    --color-darker: #0f172a;
    --color-light: #f1f5f9;
    --color-border: #334155;
    --color-text: #e2e8f0;
    --color-text-muted: #94a3b8;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--color-darker) 0%, var(--color-dark) 100%);
    color: var(--color-text);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ===================================
   Header
   =================================== */

.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 16px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo-icon {
    font-size: 48px;
    animation: spin 3s linear infinite;
    display: inline-block;
    transform-origin: center;
}

.logo-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    transform-origin: center;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.header h1 {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header h1 .suite-text {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: #e6eaf2;
    background-clip: unset;
    color: #e6eaf2;
}

.subtitle {
    font-size: 18px;
    color: var(--color-text-muted);
    margin-top: 10px;
}

.btn-back {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: rgba(99, 102, 241, 0.2);
    color: var(--color-text);
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
}

.btn-back:hover {
    background: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* ===================================
   Controls
   =================================== */

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
}

.btn-secondary {
    background: var(--color-border);
    color: var(--color-text);
}
.btn-info {
    background: var(--color-info);
    color: white;
}

.btn-upload-image {
    background: linear-gradient(135deg, #FF6B35, #F7931E);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.btn-upload-image:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===================================
   Image Preview
   =================================== */

.image-preview {
    margin-bottom: 40px;
    text-align: center;
}

.preview-container {
    position: relative;
    display: inline-block;
    max-width: 400px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--color-border);
}

.preview-container img {
    width: 100%;
    height: auto;
    display: block;
}

.btn-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-remove:hover {
    background: var(--color-danger);
    transform: scale(1.1);
}

.preview-text {
    margin-top: 15px;
    font-size: 16px;
    color: var(--color-text-muted);
    font-style: italic;
}

/* ===================================
   Palette Container
   =================================== */

.palette-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    margin-bottom: 60px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    min-height: 400px;
}

@media (max-width: 1024px) {
    .palette-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .palette-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

.color-card {
    position: relative;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-card:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.color-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px 20px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.color-card:hover .color-info {
    opacity: 1;
}

.color-hex {
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
    font-family: 'Consolas', monospace;
}

.color-rgb {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Consolas', monospace;
}

.color-actions {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.color-card:hover .color-actions {
    opacity: 1;
}

.color-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.color-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* ===================================
   Trending Section
   =================================== */

.trending-section {
    margin-bottom: 60px;
}

.section-title {
    font-size: 32px;
    text-align: center;
    margin-bottom: 30px;
    color: var(--color-text);
}

.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.trending-palette {
    background: rgba(30, 27, 75, 0.5);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s ease;
}

.trending-palette:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.trending-colors {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: 120px;
}

.trending-color {
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.trending-color:hover {
    transform: scaleY(1.15);
    filter: brightness(1.2);
    z-index: 10;
}

.trending-color::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.trending-color:hover::after {
    opacity: 1;
}

.trending-info {
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.trending-info:hover {
    background: rgba(99, 102, 241, 0.1);
}

.trending-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 5px;
}

.trending-tags {
    font-size: 12px;
    color: var(--color-text-muted);
}

/* ===================================
   Modal
   =================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--color-dark);
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--color-border);
}

.modal-header h3 {
    font-size: 24px;
    color: var(--color-text);
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--color-danger);
}

.modal-body {
    padding: 25px;
}

.export-textarea {
    width: 100%;
    min-height: 300px;
    padding: 20px;
    background: var(--color-darker);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    color: var(--color-text);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
}

.export-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.modal-footer {
    display: flex;
    gap: 15px;
    padding: 20px 25px;
    border-top: 1px solid var(--color-border);
    justify-content: flex-end;
}

/* ===================================
   Footer
   =================================== */

.footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 80px;
    background: rgba(30, 27, 75, 0.5);
    border-top: 2px solid var(--color-border);
    border-radius: 16px 16px 0 0;
}

.footer p {
    font-size: 16px;
    color: var(--color-text);
    margin: 0;
    line-height: 1.8;
}

.footer a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 5px 10px;
    border-radius: 6px;
}

.footer a:hover {
    color: var(--color-secondary);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

/* ===================================
   Animations
   =================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.color-card {
    animation: fadeIn 0.5s ease forwards;
}

.color-card:nth-child(1) { animation-delay: 0.1s; }
.color-card:nth-child(2) { animation-delay: 0.2s; }
.color-card:nth-child(3) { animation-delay: 0.3s; }
.color-card:nth-child(4) { animation-delay: 0.4s; }
.color-card:nth-child(5) { animation-delay: 0.5s; }
