/* ==========================================================================
   Colorsheet - Consolidated Stylesheet (style.css)
   ========================================================================== */

* {
    box-sizing: border-box;
}

:root {
    --blue: #1e90ff;
    --bg-page: #f8f9fa;
    --bg-card: #ffffff;
    --bg-select: rgba(0, 0, 0, 0.05);
    --bg-select-palette: #f1f3f5;
    --type: #2d3436;
    --type-muted: #636e72;
    --border: #edf2f7;
    --border-hover: #e2e8f0;
    --main: #FFC44D;
    --main-hover: #ffb72b;
    --like-color: #ff4757;
    --like-hover: #ff6b81;
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.03);
    --shadow-card-hover: 0 12px 28px rgba(0, 0, 0, 0.07);
    --shadow-dropdown: 0 12px 32px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --gap: 20px;
    --navbar-height: 56px;
}

body {
    padding: 0;
    margin: 0;
    font-family: "DM Sans", sans-serif;
    background-color: var(--bg-page);
    color: var(--type);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   No-Animations Mode Override (Ringan & Cepat saat Dimatikan)
   ========================================================================== */
html.no-animations *,
html.no-animations *::before,
html.no-animations *::after {
    animation: none !important;
    transition: none !important;
}

html.no-animations .dh-grid-item {
    opacity: 1 !important;
    transform: none !important;
}

html.no-animations .dh-color-palette-detail,
html.no-animations .dh-color-part-card,
html.no-animations .dh-harmony-badge {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

/* Posisi & Utility */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.flex { display: flex; }

.atas-kiri { top: 0; left: 0; }
.atas-kanan { top: 0; right: 0; }
.bawah-kiri { bottom: 0; left: 0; }
.bawah-kanan { bottom: 0; right: 0; }
.tengah-h { left: 50%; transform: translateX(-50%); }
.tengah-v { top: 50%; transform: translateY(-50%); }
.tengah-hv { top: 50%; left: 50%; transform: translate(-50%, -50%); }

/* ==========================================================================
   Clean & Simple Sticky Navbar
   ========================================================================== */
#dh-navbar {
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    width: 100%;
    z-index: 9999;
    border-bottom: 1px solid #edf2f7;
    transition: all 0.2s ease;
}

.dh-navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--navbar-height);
    padding: 0 24px;
    max-width: 1800px;
    margin: 0 auto;
}

.dh-logo-navbar {
    display: flex;
    align-items: center;
}

.dh-logo-navbar a {
    display: inline-flex;
    align-items: center;
}

.dh-logo-navbar img {
    height: 28px;
    width: auto;
    display: block;
    transition: opacity 0.2s ease;
}

.dh-logo-navbar img:hover {
    opacity: 0.9;
}

.dh-link-navbar-container {
    display: flex;
    align-items: center;
}

.dh-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 26px;
    margin: 0;
    padding: 0;
}

.dh-link-navbar a {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    color: #333333;
    transition: color 0.15s ease;
}

.dh-link-navbar a:hover {
    color: #000000;
}

.dh-link-navbar.active a {
    color: #000000;
    font-weight: 600;
}

/* Animation Toggle Switch in Navbar (Bigger & Clean) */
.dh-anim-toggle-item {
    display: flex;
    align-items: center;
}

.dh-anim-switch-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 15px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: #2d3436;
    user-select: none;
    transition: border-color 0.2s, background-color 0.2s;
}

.dh-anim-switch-wrap:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.dh-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
    cursor: pointer;
    margin: 0;
}

.dh-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.dh-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #cbd5e1;
    transition: background-color 0.25s ease;
    border-radius: 22px;
}

.dh-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
}

.dh-switch input:checked + .dh-slider {
    background-color: #4EBA5B;
}

.dh-switch input:checked + .dh-slider:before {
    transform: translateX(16px);
}

/* Pill Create Button in Navbar */
.dh-create-btn {
    background-color: var(--main);
    color: #111111 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 7px 22px !important;
    border-radius: 999px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.15s ease !important;
    border: none;
}

.dh-create-btn:hover {
    background-color: var(--main-hover) !important;
    transform: translateY(-1px);
}

.dh-create-btn:active {
    transform: translateY(0);
}

/* ==========================================================================
   Mobile Floating Action Button (FAB) Create
   ========================================================================== */
.dh-fab-create {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 20px;
    z-index: 9990;
    background: linear-gradient(135deg, #FFD56B 0%, #FFC44D 100%);
    color: #111111;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 22px;
    border-radius: 999px;
    box-shadow: 0 10px 25px rgba(255, 196, 77, 0.45), 0 3px 8px rgba(0,0,0,0.1);
    border: 2px solid #ffffff;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
    animation: fabPopIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.dh-fab-create:hover, .dh-fab-create:focus {
    transform: scale(1.06) translateY(-2px);
    box-shadow: 0 14px 30px rgba(255, 196, 77, 0.55), 0 4px 10px rgba(0,0,0,0.15);
    color: #000000;
}

.dh-fab-create:active {
    transform: scale(0.96);
}

/* ==========================================================================
   Modern Animated Hamburger Button
   ========================================================================== */
.dh-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 38px;
    height: 38px;
    cursor: pointer;
    padding: 0;
    border-radius: 10px;
    background: transparent;
    border: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.2s ease;
}

.dh-menu-toggle:hover,
.dh-menu-toggle:focus {
    background-color: rgba(0, 0, 0, 0.04);
    outline: none;
    border: none;
}

.dh-menu-toggle:active {
    background-color: rgba(0, 0, 0, 0.08);
}

.dh-bar {
    width: 20px;
    height: 2px;
    background-color: #2d3436;
    border-radius: 2px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.dh-bar + .dh-bar {
    margin-top: 4.5px;
}

/* Morph Hamburger to "X" when active */
.dh-menu-toggle.active .bar-1 {
    transform: translateY(6.5px) rotate(45deg);
}

.dh-menu-toggle.active .bar-2 {
    opacity: 0;
    transform: scaleX(0);
}

.dh-menu-toggle.active .bar-3 {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile Backdrop Overlay */
.dh-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s;
}

.dh-nav-backdrop.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Content Layout */
#dh-content, #dh-content-more {
    margin-top: 0;
    min-height: calc(100vh - 450px);
}

/* Grid Palettes */
.dh-container {
    display: grid;
    gap: var(--gap);
    padding: 20px 24px 36px;
    max-width: 1800px;
    margin: 0 auto;
}

/* Responsive Grid Columns */
@media (min-width: 2500px) {
    .dh-container { grid-template-columns: repeat(8, 1fr); }
}
@media (max-width: 2499px) and (min-width: 2000px) {
    .dh-container { grid-template-columns: repeat(7, 1fr); }
}
@media (max-width: 1999px) and (min-width: 1600px) {
    .dh-container { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 1599px) and (min-width: 1300px) {
    .dh-container { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 1299px) and (min-width: 1000px) {
    .dh-container { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 999px) and (min-width: 650px) {
    .dh-container { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 649px) {
    .dh-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 14px 12px 28px;
    }
}

/* ==========================================================================
   Ultra-Elegant Palette Card Items (Instant & Clean)
   ========================================================================== */
.dh-grid-item {
    background-color: var(--bg-card);
    padding: 10px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.dh-grid-item:hover {
    box-shadow: var(--shadow-card-hover);
    border-color: var(--border-hover);
}

.dh-color-palette-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: #f1f3f5;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.dh-palette-link {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.dh-color-1, .dh-color-2, .dh-color-3, .dh-color-4 {
    position: relative;
    width: 100%;
    transition: flex 0.28s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: flex;
}

.dh-color-1 { flex: 42 1 0%; }
.dh-color-2 { flex: 26 1 0%; }
.dh-color-3 { flex: 16 1 0%; }
.dh-color-4 { flex: 16 1 0%; }

/* Hover warna satuan: Warna yang di-hover menjadi paling besar (52%), 3 warna lainnya sama rata (16%) */
.dh-color-palette-box:has(.dh-color-1:hover) .dh-color-1,
.dh-color-palette-box:has(.dh-color-2:hover) .dh-color-2,
.dh-color-palette-box:has(.dh-color-3:hover) .dh-color-3,
.dh-color-palette-box:has(.dh-color-4:hover) .dh-color-4,
.dh-color-palette-detail:has(.dh-color-1:hover) .dh-color-1,
.dh-color-palette-detail:has(.dh-color-2:hover) .dh-color-2,
.dh-color-palette-detail:has(.dh-color-3:hover) .dh-color-3,
.dh-color-palette-detail:has(.dh-color-4:hover) .dh-color-4 {
    flex: 52 1 0%;
}

.dh-color-palette-box:has(.dh-color-1:hover) :is(.dh-color-2, .dh-color-3, .dh-color-4),
.dh-color-palette-box:has(.dh-color-2:hover) :is(.dh-color-1, .dh-color-3, .dh-color-4),
.dh-color-palette-box:has(.dh-color-3:hover) :is(.dh-color-1, .dh-color-2, .dh-color-4),
.dh-color-palette-box:has(.dh-color-4:hover) :is(.dh-color-1, .dh-color-2, .dh-color-3),
.dh-color-palette-detail:has(.dh-color-1:hover) :is(.dh-color-2, .dh-color-3, .dh-color-4),
.dh-color-palette-detail:has(.dh-color-2:hover) :is(.dh-color-1, .dh-color-3, .dh-color-4),
.dh-color-palette-detail:has(.dh-color-3:hover) :is(.dh-color-1, .dh-color-2, .dh-color-4),
.dh-color-palette-detail:has(.dh-color-4:hover) :is(.dh-color-1, .dh-color-2, .dh-color-3) {
    flex: 16 1 0%;
}

/* Clean Center HEX Text (No Background, No Shadow, High Contrast) */
.dh-text-color {
    position: absolute;
    top: 50% !important;
    left: 50% !important;
    bottom: auto !important;
    right: auto !important;
    transform: translate(-50%, -50%) scale(0.9);
    font-size: 15px;
    font-weight: 800;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: 0.5px;
    padding: 0;
    margin: 0;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 0 !important;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.15s ease;
    user-select: none;
    pointer-events: auto;
    cursor: pointer;
    z-index: 10;
    text-align: center;
    white-space: nowrap;
    line-height: 1;
}

/* 1. Bar Warna Terang -> Teks Gelap Kontras */
.dh-text-color,
.dh-text-color.badge-on-light {
    color: #111827;
}

.dh-text-color:hover,
.dh-text-color.badge-on-light:hover {
    color: #000000;
    transform: translate(-50%, -50%) scale(1.1);
}

/* 2. Bar Warna Gelap -> Teks Putih Kontras */
.dh-text-color.badge-on-dark {
    color: #ffffff;
}

.dh-text-color.badge-on-dark:hover {
    color: #ffffff;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Animasi feedback saat kode disalin */
.dh-text-color.copied-badge {
    transform: translate(-50%, -50%) scale(1.08) !important;
    opacity: 1 !important;
    color: #10B981 !important;
}

.dh-color-1:hover .dh-text-color,
.dh-color-2:hover .dh-text-color,
.dh-color-3:hover .dh-text-color,
.dh-color-4:hover .dh-text-color,
.dh-color-picker-container:hover .dh-text-color {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Card Bottom Action Bar */
.dh-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding: 0 2px;
}

.card-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    height: 30px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid var(--border);
    color: #4a5568;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.card-like-btn .icon-fire {
    width: 14px;
    height: 14px;
    display: block;
    transition: transform 0.2s ease;
}

.card-like-btn:hover {
    background-color: #fff5f5;
    border-color: #fed7d7;
    color: #e53e3e;
}

.card-like-btn:active {
    transform: scale(0.95);
}

.card-like-btn.liked {
    background-color: var(--like-color) !important;
    color: #ffffff !important;
    border-color: var(--like-color) !important;
    box-shadow: 0 3px 10px rgba(255, 71, 87, 0.35);
}

.card-like-btn.liked .icon-fire {
    filter: brightness(0) invert(1);
    transform: scale(1.15);
}

.card-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 30px;
    padding: 0;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid var(--border);
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
}

.card-copy-btn .icon-copy {
    width: 13px;
    height: 13px;
    margin: 0;
    display: block;
    opacity: 0.75;
    transition: transform 0.2s ease, opacity 0.2s;
}

.card-copy-btn:hover {
    background-color: #edf2f7;
    border-color: #cbd5e1;
}

.card-copy-btn:hover .icon-copy {
    opacity: 1;
    transform: scale(1.12);
}

.card-copy-btn:active {
    transform: scale(0.92);
}

.custom-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-card);
    color: var(--type);
    border: 1px solid var(--border);
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.custom-btn img {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    transition: transform 0.2s ease;
}

.custom-btn:hover {
    background-color: var(--bg-select);
    border-color: #cbd5e1;
}

.custom-btn:active {
    transform: scale(0.97);
}

.custom-btn.liked {
    background-color: var(--like-color) !important;
    color: #fff !important;
    border-color: var(--like-color) !important;
}

.custom-btn.liked img {
    filter: brightness(0) invert(1);
    transform: scale(1.15);
}

/* Infinite Scroll Loader */
.dh-loader-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 30px 20px 40px;
    color: var(--type-muted);
    font-size: 14px;
    font-weight: 500;
}

.dh-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--main);
    border-radius: 50%;
    animation: spinLoader 0.75s linear infinite;
}

@keyframes spinLoader {
    to { transform: rotate(360deg); }
}

.dh-end-message {
    text-align: center;
    padding: 24px 20px 40px;
    color: var(--type-muted);
    font-size: 13px;
    font-weight: 500;
}

.dh-end-message span {
    display: inline-block;
    padding: 6px 16px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
}

/* ==========================================================================
   Detail Page & Color Breakdown Redesign
   ========================================================================== */
.dh-detail-flex {
    display: flex;
    max-width: 1160px;
    margin: 0 auto;
    padding: 32px 24px;
    gap: 36px;
    align-items: flex-start;
}

.dh-container-detail {
    flex: 1;
    width: 100%;
}

.dh-detail-left {
    position: sticky;
    top: calc(var(--navbar-height) + 24px);
}

.dh-color-palette-detail {
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.dh-detail-action-bar {
    display: flex;
    gap: 8px;
}

.dh-detail-action-bar .dh-button-grid {
    flex: 1;
}

.dh-detail-action-bar .custom-btn {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 600;
}

/* Modern Color Breakdown Cards */
.dh-color-parts-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dh-color-part-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: var(--shadow-card);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.dh-color-part-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.dh-part-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.dh-part-swatch {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 2px solid #ffffff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}

.dh-part-title-box {
    flex: 1;
    min-width: 0;
}

.dh-part-name {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
    letter-spacing: -0.2px;
    line-height: 1.25;
}

.dh-part-hex-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #718096;
    font-family: monospace;
    margin-top: 3px;
    cursor: pointer;
    transition: color 0.15s ease;
}

.dh-part-hex-tag:hover {
    color: var(--blue);
}

.dh-part-values-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.dh-val-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 12px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    color: #4a5568;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    width: 100%;
    font-family: inherit;
    box-sizing: border-box;
}

.dh-val-pill .val-label {
    font-size: 11px;
    font-weight: 700;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 8px;
}

.dh-val-pill .val-code {
    font-size: 12.5px;
    font-weight: 600;
    color: #1a202c;
    font-family: monospace;
    text-align: right;
}

.dh-val-pill:hover {
    background: #edf2f7;
    border-color: #cbd5e1;
    color: #000;
    transform: translateY(-1px);
}

.dh-val-pill:active {
    transform: scale(0.98);
}

.dh-judul {
    margin: 0 0 16px;
    font-size: 24px;
    color: var(--type);
    font-weight: 700;
}

.dh-separator {
    margin: 40px 0 20px;
    border: 0;
    border-bottom: 1px solid var(--border);
}

.dh-more {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   Create Palette Page & Satisfying Interactions
   ========================================================================== */
.dh-container-create {
    max-width: 640px;
    margin: 24px auto 36px;
    padding: 0 20px;
}

.dh-create-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    box-shadow: var(--shadow-card-hover);
    position: relative;
    overflow: hidden;
}

.dh-create-header {
    text-align: center;
    margin-bottom: 24px;
}

.dh-create-heading {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 700;
    color: #1a202c;
    letter-spacing: -0.3px;
}

.dh-create-subheading {
    margin: 0 0 12px;
    color: var(--type-muted);
    font-size: 14px;
}

/* Harmony Slot (Fixed height to prevent jumping) */
.dh-harmony-slot {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

/* Harmony Badge */
.dh-harmony-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1.5px solid #e2e8f0;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    color: #2d3436;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    user-select: none;
}

.dh-harmony-badge.badge-wiggle {
    animation: badgeWiggle 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes badgeWiggle {
    0% { transform: scale(0.92) rotate(-5deg); }
    50% { transform: scale(1.08) rotate(4deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.dh-create-palette-preview {
    border-radius: 20px;
    overflow: hidden;
    border: 3px solid #ffffff;
    box-shadow: 0 12px 36px rgba(0,0,0,0.08);
    margin-bottom: 24px;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    position: relative;
}

.dh-create-palette-preview.anim-pulse {
    animation: previewPulse 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes previewPulse {
    0% { transform: scale(1); }
    35% { transform: scale(0.98); }
    75% { transform: scale(1.01); }
    100% { transform: scale(1); }
}

/* Silky Soft Ripple Flash on Randomize */
@keyframes colorBarFlash {
    0% { filter: brightness(1.22); }
    100% { filter: brightness(1); }
}

.ripple-anim-1 { animation: colorBarFlash 0.32s ease 0ms; }
.ripple-anim-2 { animation: colorBarFlash 0.32s ease 35ms; }
.ripple-anim-3 { animation: colorBarFlash 0.32s ease 70ms; }
.ripple-anim-4 { animation: colorBarFlash 0.32s ease 105ms; }

.dh-color-picker-container {
    cursor: pointer;
    position: relative;
    width: 100%;
    transition: flex 0.28s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.35s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s ease;
    will-change: flex;
}

.dh-color-picker-container:hover {
    filter: brightness(1.03);
}

.dh-color-picker-size-1 { flex: 42 1 0%; }
.dh-color-picker-size-2 { flex: 26 1 0%; }
.dh-color-picker-size-3 { flex: 16 1 0%; }
.dh-color-picker-size-4 { flex: 16 1 0%; }

.dh-create-palette-preview:has(.dh-color-picker-size-1:hover) .dh-color-picker-size-1,
.dh-create-palette-preview:has(.dh-color-picker-size-2:hover) .dh-color-picker-size-2,
.dh-create-palette-preview:has(.dh-color-picker-size-3:hover) .dh-color-picker-size-3,
.dh-create-palette-preview:has(.dh-color-picker-size-4:hover) .dh-color-picker-size-4 {
    flex: 52 1 0%;
}

.dh-create-palette-preview:has(.dh-color-picker-size-1:hover) :is(.dh-color-picker-size-2, .dh-color-picker-size-3, .dh-color-picker-size-4),
.dh-create-palette-preview:has(.dh-color-picker-size-2:hover) :is(.dh-color-picker-size-1, .dh-color-picker-size-3, .dh-color-picker-size-4),
.dh-create-palette-preview:has(.dh-color-picker-size-3:hover) :is(.dh-color-picker-size-1, .dh-color-picker-size-2, .dh-color-picker-size-4),
.dh-create-palette-preview:has(.dh-color-picker-size-4:hover) :is(.dh-color-picker-size-1, .dh-color-picker-size-2, .dh-color-picker-size-3) {
    flex: 16 1 0%;
}

/* Cute Floating Sparkles Particle */
.dh-sparkle-particle {
    position: fixed;
    pointer-events: none;
    font-size: 18px;
    z-index: 999999;
    user-select: none;
    animation: floatSparkle 0.75s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes floatSparkle {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(0.6) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx, 0px), var(--ty, -60px)) scale(1.3) rotate(var(--tr, 45deg));
    }
}

/* Custom 1:1 Square Desktop Pickr Polish */
.pcr-app {
    border-radius: 18px !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22), 0 4px 16px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    z-index: 999999 !important;
    padding: 16px !important;
    width: 320px !important;
    max-width: 95vw !important;
    background: #ffffff !important;
}

.pcr-app[data-theme=classic] .pcr-selection {
    display: flex !important;
    align-items: stretch !important;
    gap: 10px !important;
}

/* 1:1 Aspect Ratio Color Palette */
.pcr-app[data-theme=classic] .pcr-selection .pcr-color-palette {
    width: 220px !important;
    height: 220px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    flex-grow: 1 !important;
}

.pcr-app[data-theme=classic] .pcr-selection .pcr-color-palette .pcr-palette {
    border-radius: 12px !important;
}

.pcr-app[data-theme=classic] .pcr-selection .pcr-color-chooser {
    height: 220px !important;
    margin-left: 0 !important;
}

.pcr-app[data-theme=classic] .pcr-selection .pcr-color-chooser .pcr-slider {
    width: 14px !important;
    border-radius: 999px !important;
}

.pcr-app[data-theme=classic] .pcr-selection .pcr-color-preview {
    margin-right: 0 !important;
    width: 28px !important;
    height: 220px !important;
    border-radius: 10px !important;
    overflow: hidden !important;
}

.pcr-app[data-theme=classic] .pcr-selection .pcr-color-preview .pcr-last-color,
.pcr-app[data-theme=classic] .pcr-selection .pcr-color-preview .pcr-current-color {
    border-radius: 0 !important;
}

/* 3 Rows of Swatches (10 Columns per row) */
.pcr-app .pcr-swatches {
    display: grid !important;
    grid-template-columns: repeat(10, 1fr) !important;
    gap: 5px !important;
    margin-top: 14px !important;
    padding: 0 !important;
}

.pcr-app .pcr-swatches > button {
    width: 100% !important;
    height: 22px !important;
    margin: 0 !important;
    border-radius: 5px !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1) !important;
    transition: transform 0.15s ease !important;
}

.pcr-app .pcr-swatches > button:hover {
    transform: scale(1.15) !important;
    z-index: 2 !important;
}

/* Bottom Row: Input + Big OK Button */
.pcr-app .pcr-interaction {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 14px !important;
    width: 100% !important;
}

.pcr-app .pcr-interaction .pcr-type,
.pcr-app .pcr-interaction .pcr-clear,
.pcr-app .pcr-interaction .pcr-cancel {
    display: none !important;
}

.pcr-app .pcr-interaction .pcr-result {
    flex: 1 !important;
    min-width: 0 !important;
    height: 44px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-align: center !important;
    background: #f1f5f9 !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 10px !important;
    color: #1e293b !important;
    padding: 0 12px !important;
    margin: 0 !important;
    letter-spacing: 0.5px !important;
}

.pcr-app .pcr-interaction .pcr-result:focus {
    border-color: #3b82f6 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

.pcr-app .pcr-interaction .pcr-save {
    flex: 1.2 !important;
    height: 44px !important;
    background: #2563eb !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25) !important;
}

.pcr-app .pcr-interaction .pcr-save:hover {
    background: #1d4ed8 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35) !important;
}

.pcr-app .pcr-interaction .pcr-save:active {
    transform: translateY(0) !important;
}

.dh-create-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
    width: 100%;
}

/* Satisfying Random Button (Bigger & Stacked) */
.btn-satisfying-random {
    width: 100%;
    height: 52px;
    padding: 0 20px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    color: #1a202c;
    font-weight: 700;
    font-size: 15.5px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,0.04);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
}

.btn-satisfying-random:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.btn-satisfying-random:active, .btn-satisfying-random.pop-bounce {
    transform: scale(0.97);
}

.btn-satisfying-random .btn-dice-icon {
    display: inline-block;
    font-size: 22px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-satisfying-random.dice-spin .btn-dice-icon {
    transform: rotate(360deg) scale(1.2);
}

/* Save Palette Button (Bigger & Stacked) */
.btn-primary-save {
    width: 100%;
    height: 52px;
    padding: 0 24px;
    background: linear-gradient(135deg, #FFD56B 0%, #FFC44D 100%);
    color: #111111;
    font-weight: 700;
    font-size: 15.5px;
    border-radius: 14px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255, 196, 77, 0.45);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
    overflow: hidden;
    position: relative;
    font-family: inherit;
}

.btn-primary-save:hover {
    background: linear-gradient(135deg, #ffd05a 0%, #ffb72b 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(255, 196, 77, 0.6);
}

.btn-primary-save:active {
    transform: scale(0.97);
}

.btn-plane-icon {
    display: inline-flex;
    align-items: center;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.plane-img {
    width: 20px;
    height: 20px;
    display: block;
}

.btn-primary-save.flying .btn-plane-icon {
    animation: flyPlaneOut 0.65s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes flyPlaneOut {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 1; }
    30% { transform: translate(-4px, 4px) scale(1.1) rotate(-15deg); }
    100% { transform: translate(50px, -50px) scale(0.3) rotate(35deg); opacity: 0; }
}

.btn-primary-save.saving {
    background: linear-gradient(135deg, #6BCB77 0%, #4EBA5B 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(107, 203, 119, 0.4) !important;
    pointer-events: none;
}

.dh-create-footer-note {
    margin-top: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--type-muted);
}

/* Toast Notification */
.dh-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(33, 37, 41, 0.95);
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    font-size: 14px;
    font-weight: 500;
    z-index: 100000;
    display: none;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1);
    animation: toastSlideUp 0.3s ease;
}

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

/* ==========================================================================
   Modern Clean Footer Design
   ========================================================================== */
#dh-footer {
    background-color: #ffffff;
    border-top: 1px solid #edf2f7;
    margin-top: 70px;
    color: #4a5568;
}

.dh-footer-wrap {
    max-width: 1300px;
    margin: 0 auto;
    padding: 56px 24px 28px;
}

.dh-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.3fr;
    gap: 48px;
    margin-bottom: 48px;
}

.dh-footer-col {
    display: flex;
    flex-direction: column;
}

.dh-footer-logo-brand a {
    display: inline-block;
}

.footer-logo-main {
    height: 30px;
    width: auto;
    display: block;
}

.dh-footer-desc {
    font-size: 14px;
    color: #718096;
    line-height: 1.65;
    margin: 14px 0 20px;
}

.dh-footer-creator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #a0aec0;
}

.footer-logo-creator {
    height: 22px;
    width: auto;
    display: block;
    filter: grayscale(100%);
    opacity: 0.75;
    transition: filter 0.2s ease, opacity 0.2s ease;
}

.footer-logo-creator:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.dh-footer-heading {
    font-size: 15px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 18px;
    letter-spacing: -0.2px;
}

.dh-footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dh-footer-menu li a {
    font-size: 14px;
    color: #4a5568;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: color 0.15s ease, transform 0.15s ease;
}

.dh-footer-menu li a:hover {
    color: #000;
    transform: translateX(3px);
}

.dh-color-pills-guide {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dh-guide-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #4a5568;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #edf2f7;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.dh-guide-item:hover {
    background-color: #f1f5f9;
    border-color: #e2e8f0;
}

.guide-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-primary { background-color: #FF6B6B; }
.dot-secondary { background-color: #4D96FF; }
.dot-accent { background-color: #FFD93D; }
.dot-neutral { background-color: #94A3B8; }

.dh-guide-item strong {
    color: #2d3436;
}

.dh-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid #edf2f7;
    font-size: 13px;
    color: #a0aec0;
}

.dh-copyright strong {
    color: #4a5568;
}

.dh-tagline {
    font-size: 13px;
    color: #718096;
}

.dh-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border);
    color: var(--type-muted);
}

.dh-empty-state a {
    color: var(--blue);
    font-weight: 600;
}

/* ==========================================================================
   Mobile Responsive Navigation & Footer
   ========================================================================== */
@media (max-width: 900px) {
    .dh-detail-flex {
        flex-direction: column;
        align-items: stretch;
        padding: 20px 16px;
        gap: 24px;
    }
    .dh-detail-left {
        position: static;
    }
    .dh-footer-grid {
        grid-template-columns: 1fr;
        gap: 36px;
        margin-bottom: 36px;
    }
    .dh-footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .dh-menu-toggle {
        display: flex;
    }
    .dh-fab-create {
        display: inline-flex;
    }
    
    /* Modern Floating Dropdown Card */
    .dh-menu {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: calc(var(--navbar-height) + 8px);
        right: 16px;
        width: min(230px, calc(100vw - 32px));
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid #edf2f7;
        border-radius: 16px;
        padding: 6px;
        box-shadow: 0 14px 36px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
        gap: 2px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px) scale(0.96);
        pointer-events: none;
        transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
        z-index: 10000;
    }

    .dh-menu.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }

    .dh-menu li {
        width: 100%;
        list-style: none;
    }

    .dh-menu li a {
        display: flex;
        align-items: center;
        padding: 10px 14px;
        width: 100%;
        border-radius: 10px;
        font-size: 14.5px;
        font-weight: 500;
        color: #2d3436;
        transition: background-color 0.15s ease, color 0.15s ease;
    }

    .dh-menu li a:hover {
        background-color: #f1f5f9;
        color: #000;
    }

    .dh-menu li.active a {
        background-color: #f1f5f9;
        color: #000;
        font-weight: 600;
    }

    /* Animasi Toggle Row in Mobile Menu */
    .dh-menu li.dh-anim-toggle-item {
        border-top: 1px solid #f1f5f9;
        margin-top: 4px;
        padding-top: 4px;
        width: 100%;
    }

    .dh-menu .dh-anim-switch-wrap {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 14px;
        background: transparent;
        border: none;
        border-radius: 10px;
        font-size: 14.5px;
        font-weight: 500;
        color: #2d3436;
    }

    .dh-menu .dh-anim-switch-wrap:hover {
        background-color: #f8fafc;
    }

    /* Hilangkan Tombol Create di Mobile Menu (karena sudah ada Floating Button di kanan bawah) */
    .dh-menu li.dh-create-item {
        display: none !important;
    }
}

/* ==========================================================================
   Liked Palettes Page & Empty State
   ========================================================================== */
.dh-liked-page-header {
    text-align: center;
    padding: 24px 20px 8px;
    max-width: 800px;
    margin: 0 auto;
}

.dh-liked-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: #e53e3e;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.dh-liked-title {
    font-size: 26px;
    font-weight: 800;
    color: #1a202c;
    margin: 0 0 6px;
    letter-spacing: -0.3px;
}

.dh-liked-subtitle {
    font-size: 14px;
    color: var(--type-muted);
    margin: 0;
}

/* Empty State */
.dh-empty-state {
    text-align: center;
    padding: 60px 20px 80px;
    max-width: 480px;
    margin: 0 auto;
}

.dh-empty-icon-wrap {
    width: 72px;
    height: 72px;
    background: #fff5f5;
    border: 1.5px solid #fed7d7;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    box-shadow: 0 8px 24px rgba(254, 178, 178, 0.25);
}

.dh-empty-icon {
    font-size: 32px;
}

.dh-empty-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 8px;
}

.dh-empty-desc {
    font-size: 14px;
    color: var(--type-muted);
    line-height: 1.6;
    margin: 0 0 24px;
}

.dh-empty-btn {
    background: linear-gradient(135deg, #FFD56B 0%, #FFC44D 100%);
    color: #111111 !important;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 4px 14px rgba(255, 196, 77, 0.4);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
}

.dh-empty-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 196, 77, 0.55);
}
