/* Google Font */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Container */
.container {
    background: #ffffff;
    border-radius: 1.2rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 820px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

/* Title */
h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #1f2933;
    font-weight: 600;
    position: relative;
}

h1::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #4f46e5);
    border-radius: 2px;
}

/* Generate Button */
#generate-btn {
    display: block;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #ffffff;
    padding: 0.9rem 2rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(79, 70, 229, 0.4);
}

#generate-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Palette Layout */
.palette-container {
    display: grid;
    gap: 1.2rem;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

/* Color Card */
.color-box {
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.color-box:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.12);
}

/* Color Display */
.color {
    height: 130px;
    cursor: pointer;
}

/* Info Section */
.color-info {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

/* Hex Value */
.hex-value {
    font-weight: 500;
    font-size: 0.9rem;
    color: #111827;
    letter-spacing: 0.6px;
}

/* Copy Icon */
.copy-btn {
    cursor: pointer;
    color: #6b7280;
    font-size: 1rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.copy-btn:hover {
    color: #2563eb;
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1.5rem;
    }

    .palette-container {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
}
