:root {
    --bg-color: #fdfbf7;
    --text: #1c1917;
    --border: #e7e5e4;
    --primary: #ea580c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Work Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem;
}

.container {
    width: 100%;
    max-width: 800px;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.highlight {
    color: var(--primary);
    font-style: italic;
}

.subtitle {
    color: #78716c;
}

.upload-area {
    background: white;
    border: 2px dashed var(--border);
    border-radius: 1rem;
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.upload-area:hover,
.upload-area:focus {
    border-color: var(--primary);
    background: #fff7ed;
    outline: none;
}

.upload-content {
    text-align: center;
    pointer-events: none;
}

.icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

#preview-img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    position: absolute;
    z-index: 10;
}

.hidden {
    display: none !important;
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.color-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
    cursor: pointer;
}

.color-card:hover,
.color-card:focus {
    transform: translateY(-5px);
    outline: 2px solid var(--primary);
}

.color-swatch {
    height: 100px;
    width: 100%;
}

.color-info {
    padding: 1rem;
    text-align: center;
}

.hex-code {
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.rgb-code {
    font-size: 0.8rem;
    color: #78716c;
}

.actions {
    text-align: center;
    margin-top: 2rem;
}

.secondary-btn {
    background: white;
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.secondary-btn:hover,
.secondary-btn:focus {
    border-color: var(--text);
    outline: none;
}

/* Skeleton Loading */
.skeleton {
    height: 150px;
    background: #f5f5f4;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}