<style>
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

* {
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #333;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    width: 90%;
    max-width: 800px;
    text-align: center;
}

h1 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 2.5rem;
    font-weight: 700;
}

.subtitle {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.controls {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

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

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e9ecef;
}

.btn-secondary:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.palette {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.palette.show {
    opacity: 1;
    transform: translateY(0);
}

.color-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.color-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.color-preview {
    height: 120px;
    position: relative;
    transition: all 0.3s ease;
}

.color-card:hover .color-preview {
    height: 130px;
}

.color-info {
    padding: 1rem;
    text-align: center;
}

.color-hex {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.color-name {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.copy-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.copy-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    transform: translateX(300px);
    transition: transform 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-notification.show {
    transform: translateX(0);
}

.palette-type {
    margin-bottom: 1rem;
}

.palette-type select {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    min-width: 200px;
}

.loading {
    display: none;
    margin: 2rem 0;
}

.loading.show {
    display: block;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .container {
        margin: 1rem;
        padding: 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    .palette {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.8rem;
    }
}
</style>