*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    height: 100dvh;
    overflow-x: hidden;
    scroll-behavior: smooth;
    scroll-padding-top: 2.75rem;
    -webkit-text-size-adjust: 100%;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    /*
    padding-bottom: 2rem;
    */
    color: #121212;
    line-height: 1.6;
    background: #f5f5f5;
    font-family: 'IBM Plex Mono', system-ui, monospace;
}
main {
    flex: 1;
}
header {
    text-align: center;
    margin-bottom: 1rem;
    padding: 2rem 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
header h1 {
    color: #000000;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-family: 'Megrim', system-ui;
}
header h1 a {
    color: #000000;
    text-decoration: none;
    transition: color .25s ease;
}
header h1 a:hover {
    color: #ffa69e;
    cursor: pointer;
}

.link:not(:last-child) {
    text-decoration: none;
    cursor: pointer;
    color: #ffa69e;
    &:hover {
        color: #d65a3a;
    }
}
.subtitle {
    color: #4a4a4a;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.filter-btn {
    background: #ffffff;
    border: 1px solid #ffe4ee;
    border-radius: 50px;
    padding: 0.5rem 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn.active, .filter-btn:hover {
    background: #121212;
    color: #ffffff;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.color-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.color-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.12);
}

.color-preview {
    height: 140px;
    position: relative;
}

.color-info {
    background: #ffffff;
    padding: 1.2rem;
}

.color-name {
    font-weight: 600;
    margin-bottom: 0.3rem;
    text-transform: capitalize;
}

.color-hex {
    color: #4a4a4a;
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #121212;
    color: #ffffff;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
footer {
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    padding: 1rem;
    margin: 1rem auto 0;
    width: 100%;
    font-weight: 600;
    font-family: 'Jura', sans-serif;
}
i {
    text-decoration: none;
    padding: 0 .25rem;
    cursor: pointer;
    color: #ffa69e;
    &:hover {
        color: #d65a3a;
    }
}
@media (max-width: 768px) {
    .color-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

@media (max-width: 480px) {
    .color-grid {
        grid-template-columns: 1fr;
    }
    
    header {
        padding: 1.5rem 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
}