* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --zinc-50: #fafafa;
    --zinc-100: #f4f4f5;
    --zinc-200: #e4e4e7;
    --zinc-300: #d4d4d8;
    --zinc-400: #a1a1aa;
    --zinc-500: #71717a;
    --zinc-600: #52525b;
    --zinc-700: #3f3f46;
    --zinc-800: #27272a;
    --zinc-900: #18181b;
    --rose-500: #f43f5e;
    --sidebar-width: 260px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: white;
    min-height: 100vh;
    color: var(--zinc-900);
    line-height: 1.5;
}

::selection {
    background: var(--zinc-100);
    color: var(--zinc-900);
}

/* Flaticon uicons baseline fix */
[class^="fi-"],
[class*=" fi-"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   Auth Login Button (Header)
   ======================================== */
.btn-auth-login {
    background: var(--zinc-900);
    color: white;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-auth-login:hover {
    background: var(--zinc-700);
}

/* ========================================
   Auth Modal
   ======================================== */

.auth-field {
    margin-bottom: 16px;
}

.auth-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--zinc-500);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--zinc-200);
    border-radius: 8px;
    font-size: 14px;
    color: var(--zinc-900);
    outline: none;
    transition: border-color 0.2s;
}

.auth-field input:focus {
    border-color: var(--zinc-400);
    box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.05);
}

.auth-field input::placeholder {
    color: var(--zinc-300);
}

.auth-error {
    font-size: 13px;
    color: var(--rose-500);
    margin-bottom: 12px;
    min-height: 20px;
}

.auth-submit {
    width: 100%;
    padding: 11px;
    font-size: 14px;
    margin-bottom: 0;
}

.auth-submit:disabled {
    background: var(--zinc-300);
    cursor: not-allowed;
}

.auth-toggle-text {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--zinc-500);
}

.auth-toggle-text a {
    color: var(--zinc-700);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s;
}

.auth-toggle-text a:hover {
    color: var(--zinc-900);
}

/* Google Login Button */
.btn-google-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    background: white;
    border: 1px solid var(--zinc-200);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--zinc-700);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-google-login:hover {
    background: var(--zinc-50);
    border-color: var(--zinc-300);
}

.btn-google-login svg {
    flex-shrink: 0;
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--zinc-200);
}

.auth-divider span {
    padding: 0 12px;
    font-size: 12px;
    color: var(--zinc-400);
    white-space: nowrap;
}

/* ========================================
   Header
   ======================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--zinc-100);
}

.header-content {
    max-width: 100%;
    margin: 0 auto;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    gap: 16px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--zinc-400);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 14px;
}

.btn-icon:hover {
    background: var(--zinc-100);
    color: var(--zinc-900);
}

.logo {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.logo-text {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--zinc-900);
}

.logo-subtitle {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--zinc-900);
}

/* Search */
.search-container {
    flex: 1;
    max-width: 360px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 10px;
    color: var(--zinc-300);
    font-size: 12px;
    pointer-events: none;
}

#search-input {
    width: 100%;
    padding: 7px 32px 7px 30px;
    border: 1px solid var(--zinc-200);
    border-radius: 8px;
    font-size: 13px;
    color: var(--zinc-900);
    background: var(--zinc-50);
    outline: none;
    transition: all 0.2s;
}

#search-input:focus {
    border-color: var(--zinc-400);
    background: white;
    box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.05);
}

#search-input::placeholder {
    color: var(--zinc-300);
}

.btn-clear-search {
    position: absolute;
    right: 6px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--zinc-200);
    border: none;
    border-radius: 50%;
    color: var(--zinc-500);
    cursor: pointer;
    font-size: 10px;
    transition: all 0.15s;
}

.btn-clear-search:hover {
    background: var(--zinc-300);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.header-links {
    display: flex;
    align-items: center;
    gap: 16px;
    border-right: 1px solid var(--zinc-100);
    padding-right: 20px;
}

.header-link {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    font-size: 13px;
    font-weight: 500;
    color: var(--zinc-500);
    cursor: pointer;
    transition: color 0.2s;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    line-height: 1;
    white-space: nowrap;
}

.header-link:hover {
    color: var(--zinc-900);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 1px solid var(--zinc-100);
    padding-left: 20px;
}

.user-logged-in {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-logged-in.hidden {
    display: none;
}

.user-email {
    font-size: 12px;
    color: var(--zinc-400);
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-primary {
    background: var(--zinc-900);
    color: white;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-primary:hover {
    background: var(--zinc-800);
}

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

.btn-secondary {
    background: white;
    color: var(--zinc-700);
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid var(--zinc-200);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: var(--zinc-50);
    border-color: var(--zinc-300);
}

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

/* ========================================
   Sidebar
   ======================================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 56px;
    width: var(--sidebar-width);
    height: calc(100vh - 56px);
    background: var(--zinc-50);
    border-right: 1px solid var(--zinc-100);
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.25s ease;
    z-index: 40;
}

.sidebar.collapsed {
    transform: translateX(calc(-1 * var(--sidebar-width)));
}

.sidebar-section {
    padding: 16px;
    border-bottom: 1px solid var(--zinc-100);
}

.sidebar-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.sidebar-section h4,
.sidebar-section-header h4 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--zinc-400);
    margin-bottom: 0;
}

.sidebar-section > h4 {
    margin-bottom: 10px;
}

.btn-clear-tags {
    font-size: 11px;
    font-weight: 600;
    color: var(--zinc-400);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s;
}

.btn-clear-tags:hover {
    color: var(--zinc-900);
}

.sidebar-empty-hint {
    font-size: 12px;
    color: var(--zinc-300);
    font-style: italic;
}

.sidebar-tag-chips {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-tag-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.15s;
    height: 28px;
    user-select: none;
    cursor: grab;
}

.sidebar-tag-row.dragging {
    opacity: 0.2;
}

.sidebar-tag-row:hover {
    background: var(--zinc-100);
}

.sidebar-tag-row.confirming-delete {
    background: rgba(244, 63, 94, 0.08);
}

.sidebar-tag-row.confirming-delete .sidebar-tag-action-btn.delete {
    color: var(--rose-500);
}

.sidebar-tag-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: var(--zinc-700);
    line-height: 1;
}

.sidebar-tag-checkbox {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    accent-color: var(--zinc-900);
    cursor: pointer;
    margin: 0;
}

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

.sidebar-tag-name-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-tag-count {
    font-size: 11px;
    color: var(--zinc-400);
    flex-shrink: 0;
    margin-right: auto;
}

.sidebar-tag-actions {
    display: none;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.sidebar-tag-row:hover .sidebar-tag-actions {
    display: flex;
}

.sidebar-tag-action-btn {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--zinc-300);
    cursor: pointer;
    border-radius: 4px;
    font-size: 9px;
    transition: all 0.15s;
}

.sidebar-tag-action-btn:hover {
    color: var(--zinc-700);
    background: var(--zinc-200);
}

.sidebar-tag-action-btn.delete:hover {
    color: var(--rose-500);
}

.sidebar-tag-rename-input {
    min-width: 0;
    width: 80px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    color: var(--zinc-900);
    border: none;
    border-bottom: 1.5px solid var(--zinc-900);
    background: transparent;
    padding: 0;
    outline: none;
    line-height: 1;
}

.sidebar-groups-section {
    flex: 1;
}

.sidebar-group-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-group-item {
    padding: 8px 10px;
    border-radius: 6px;
    cursor: grab;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    transition: background 0.15s;
    font-size: 13px;
    font-weight: 500;
    user-select: none;
    color: var(--zinc-700);
    user-select: none;
}

.sidebar-group-item:hover {
    background: var(--zinc-100);
}

.sidebar-group-item.active {
    background: var(--zinc-900);
    color: white;
}

.sidebar-group-item.drag-over-item {
    box-shadow: 0 -2px 0 0 var(--zinc-400);
}

.sidebar-grip {
    font-size: 10px;
    color: var(--zinc-200);
    flex-shrink: 0;
    transition: color 0.15s;
}

.sidebar-group-item:hover .sidebar-grip {
    color: var(--zinc-400);
}

.sidebar-group-item .group-nav-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-group-item .group-nav-count {
    font-size: 11px;
    font-weight: 600;
    color: var(--zinc-400);
    flex-shrink: 0;
}

.sidebar-group-item.active .group-nav-count {
    color: var(--zinc-400);
}

/* Sidebar: 我的分享 */
.sidebar-shares-section {
    border-top: 1px solid var(--zinc-100);
    padding-top: 16px;
}

.sidebar-share-count {
    font-size: 11px;
    font-weight: 600;
    color: var(--zinc-400);
}

.sidebar-share-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-share-item {
    padding: 6px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--zinc-600);
    transition: background 0.15s;
}

.sidebar-share-item:hover {
    background: var(--zinc-100);
}

.sidebar-share-item .share-item-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.sidebar-share-item .share-item-title:hover {
    color: var(--zinc-900);
}

.sidebar-share-item .share-item-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    color: var(--zinc-300);
    padding: 2px;
    display: flex;
    align-items: center;
    transition: color 0.15s;
    flex-shrink: 0;
}

.sidebar-share-item .share-item-btn:hover {
    color: var(--zinc-600);
}

.sidebar-share-item .share-item-btn.btn-delete-share:hover {
    color: var(--rose-500);
}

.sidebar-share-item .share-item-btn.btn-delete-share.confirming {
    color: var(--rose-500);
}

/* Sidebar: 匯出/匯入 */
.sidebar-io-section {
    border-top: 1px solid var(--zinc-100);
    padding-top: 16px;
}

.sidebar-io-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-io-btn {
    width: 100%;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--zinc-500);
    background: var(--zinc-50);
    border: 1px solid var(--zinc-200);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
}

.sidebar-io-btn:hover {
    background: var(--zinc-100);
    color: var(--zinc-700);
}

/* Sidebar: 管理員區塊 */
.sidebar-admin-section {
    border-top: 1px solid var(--zinc-100);
    padding-top: 16px;
}

.sidebar-admin-section h4 {
    color: var(--zinc-500);
}

.sidebar-admin-group {
    margin-top: 8px;
}

.sidebar-admin-email {
    font-size: 11px;
    font-weight: 600;
    color: var(--zinc-400);
    padding: 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-admin-list .sidebar-share-item {
    padding-left: 16px;
}

.sidebar-shares-empty,
.sidebar-admin-empty {
    font-size: 12px;
    color: var(--zinc-300);
    padding: 8px 10px;
}

/* ========================================
   Main Content
   ======================================== */
main {
    max-width: 100%;
    margin: 0 auto;
    padding: 72px 24px 160px;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.25s ease;
}

main.sidebar-collapsed {
    margin-left: 0;
}

/* ========================================
   Palette Groups
   ======================================== */
.groups-section {
    margin-bottom: 40px;
}

.groups-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: var(--zinc-400);
    font-size: 14px;
}

.empty-state {
    padding: 160px 0;
    border: 1px dashed var(--zinc-200);
    border-radius: 16px;
    text-align: center;
}

.empty-state p {
    color: var(--zinc-400);
    font-weight: 300;
    font-size: 15px;
}

.empty-state button {
    margin-top: 16px;
    color: var(--zinc-900);
    font-weight: 500;
    font-size: 15px;
    background: none;
    border: none;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

/* Palette Card */
.palette-card {
    border: 1px solid var(--zinc-100);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    background: white;
}

.palette-card:hover {
    border-color: var(--zinc-200);
}

.palette-card.dragging {
    opacity: 0.3;
    transform: scale(0.99);
    filter: grayscale(1);
}

.palette-card.drag-over {
    outline: 2px dashed var(--zinc-400);
    outline-offset: -2px;
    background: rgba(244, 244, 245, 0.5);
}

.palette-card.drop-before {
    box-shadow: 0 -3px 0 0 var(--zinc-900);
}

.palette-card.drop-after {
    box-shadow: 0 3px 0 0 var(--zinc-900);
}

.palette-card.search-hidden {
    display: none;
}

.palette-header {
    padding: 12px 20px;
    border-bottom: 1px solid var(--zinc-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(250, 250, 250, 0.3);
    gap: 12px;
}

.palette-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-grow: 1;
    min-width: 0;
}

.btn-collapse {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--zinc-300);
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 4px;
    font-size: 11px;
    flex-shrink: 0;
}

.btn-collapse:hover {
    color: var(--zinc-900);
    background: var(--zinc-100);
}

.btn-collapse i {
    transition: transform 0.2s;
}

.palette-card.collapsed .btn-collapse i {
    transform: rotate(-90deg);
}

.drag-handle {
    color: var(--zinc-200);
    cursor: grab;
    transition: color 0.2s;
    font-size: 12px;
    flex-shrink: 0;
}

.drag-handle:hover {
    color: var(--zinc-400);
}

.drag-handle:active {
    cursor: grabbing;
}

.palette-title {
    background: transparent;
    font-weight: 500;
    color: var(--zinc-900);
    font-size: 15px;
    border: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s;
    width: 100%;
    max-width: 320px;
    padding: 3px 4px;
    outline: none;
}

.palette-title:focus {
    border-bottom-color: var(--zinc-900);
}

.palette-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--zinc-400);
    letter-spacing: 0.05em;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Tag chips in palette header */
.palette-tags {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    cursor: grab;
    transition: opacity 0.15s;
    white-space: nowrap;
    user-select: none;
}

.tag-chip.dragging {
    opacity: 0.3;
}

.tag-chip .tag-remove {
    cursor: pointer;
    font-size: 9px;
    opacity: 0;
    transition: opacity 0.15s;
    margin-left: 2px;
}

.tag-chip:hover .tag-remove {
    opacity: 1;
}

.btn-add-tag {
    font-size: 11px;
    font-weight: 600;
    color: var(--zinc-300);
    background: none;
    border: 1px dashed var(--zinc-200);
    border-radius: 99px;
    padding: 2px 8px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.btn-add-tag:hover {
    color: var(--zinc-500);
    border-color: var(--zinc-300);
}

/* Tag Dropdown */
.tag-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 220px;
    background: white;
    border: 1px solid var(--zinc-200);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 60;
    overflow: hidden;
}

.tag-dropdown-input {
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-bottom: 1px solid var(--zinc-100);
    font-size: 13px;
    outline: none;
    color: var(--zinc-900);
    background: white;
}

.tag-dropdown-input::placeholder {
    color: var(--zinc-300);
}

.tag-dropdown-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 4px;
}

.tag-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--zinc-700);
    transition: background 0.1s;
}

.tag-dropdown-item:hover {
    background: var(--zinc-50);
}

.tag-dropdown-item.selected {
    background: var(--zinc-50);
}

.tag-dropdown-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tag-dropdown-name {
    flex: 1;
    text-align: left;
}

.tag-dropdown-check {
    font-size: 10px;
    color: var(--zinc-500);
}

.tag-dropdown-hint {
    padding: 12px;
    font-size: 12px;
    color: var(--zinc-300);
    font-style: italic;
    text-align: center;
}

.tag-dropdown-create {
    color: var(--zinc-500);
    font-weight: 600;
}

/* Group drag ghost placeholder */
.group-drag-placeholder {
    transition: top 0.1s ease;
}

/* Sidebar drag */
.sidebar-group-item.dragging {
    opacity: 0.2;
}

.sidebar-drag-placeholder {
    transition: top 0.1s ease;
}

.palette-header-right {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-shrink: 0;
}

.btn-action {
    font-size: 12px;
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-add-swatch {
    color: var(--zinc-900);
}

.btn-add-swatch:hover {
    opacity: 0.5;
}

.btn-share {
    color: var(--zinc-400);
}

.btn-share:hover {
    color: var(--zinc-700);
}

.btn-share.active {
    color: #3b82f6;
}

.btn-delete {
    color: var(--zinc-300);
}

.btn-delete:hover {
    color: var(--zinc-900);
}

.btn-delete.confirming {
    color: var(--rose-500);
}

.palette-body {
    padding: 24px;
    transition: padding 0.2s;
}

.palette-card.collapsed .palette-body {
    display: none;
}

.swatches-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.swatches-empty {
    width: 100%;
    padding: 48px 0;
    text-align: center;
    color: var(--zinc-300);
    font-size: 13px;
    font-style: italic;
    font-weight: 300;
}

/* ========================================
   Color Swatch
   ======================================== */
.swatch {
    position: relative;
    width: 76px;
    transition: all 0.2s;
    border-radius: 8px;
    padding: 4px;
    cursor: grab;
}

.swatch:hover {
    background: rgba(250, 250, 250, 0.5);
}

.swatch.dragging {
    opacity: 0.2;
    transform: scale(0.9);
}

.swatch:active {
    cursor: grabbing;
}

.swatch-actions {
    position: absolute;
    top: 2px;
    right: 2px;
    display: flex;
    gap: 3px;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
}

.swatch:hover .swatch-actions {
    opacity: 1;
}

.swatch-btn {
    width: 18px;
    height: 18px;
    background: var(--zinc-900);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    font-size: 9px;
    transition: background 0.2s;
}

.swatch-btn:hover {
    background: var(--zinc-700);
}

.swatch-btn.confirming {
    background: var(--rose-500);
}

.swatch-btn.confirming:hover {
    background: #e11d48;
}

.swatch-color {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 5px;
    border: 1px solid var(--zinc-100);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s;
    cursor: pointer;
}

.swatch:hover .swatch-color {
    transform: scale(1.03);
}

.swatch-color-preview {
    width: 100%;
    height: 100%;
}

.swatch-info {
    padding: 0 2px;
}

.swatch-hex {
    width: 100%;
    font-size: 13px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 600;
    color: var(--zinc-900);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    background: transparent;
    border: none;
    padding: 0;
    outline: none;
}

.swatch-name {
    width: 100%;
    font-size: 12px;
    font-weight: 500;
    color: var(--zinc-400);
    background: transparent;
    border: none;
    padding: 0;
    margin-top: 1px;
    outline: none;
}

.swatch-name::placeholder {
    color: var(--zinc-200);
}

/* ========================================
   Bottom Section
   ======================================== */
.bottom-section {
    padding-top: 40px;
    border-top: 1px solid var(--zinc-100);
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}

@media (min-width: 1024px) {
    .bottom-section {
        grid-template-columns: 2fr 1fr;
    }
}

/* Image Playground */
.playground-card {
    border: 1px solid var(--zinc-100);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    background: white;
}

.playground-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--zinc-100);
    background: white;
}

.playground-header h2 {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--zinc-900);
    margin-bottom: 2px;
}

.playground-header p {
    color: var(--zinc-500);
    font-size: 12px;
    font-weight: 400;
}

.playground-content {
    display: flex;
    flex-direction: column;
}

@media (min-width: 1280px) {
    .playground-content {
        flex-direction: row;
    }
}

.playground-canvas-area {
    flex-grow: 1;
    min-height: 280px;
    background: rgba(250, 250, 250, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.playground-empty {
    text-align: center;
    opacity: 0.3;
}

.playground-empty i {
    font-size: 28px;
    margin-bottom: 12px;
    color: var(--zinc-300);
}

.playground-empty p {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--zinc-400);
}

#playground-canvas {
    cursor: crosshair;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    transition: opacity 0.2s;
    max-width: 100%;
}

#playground-canvas:hover {
    opacity: 0.95;
}

.btn-clear-canvas {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--zinc-400);
    font-size: 11px;
    font-weight: 600;
    background: white;
    padding: 5px 10px;
    border-radius: 999px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-clear-canvas:hover {
    color: var(--rose-500);
}

.playground-picker {
    width: 100%;
    padding: 20px;
    background: white;
    border-top: 1px solid var(--zinc-100);
}

@media (min-width: 1280px) {
    .playground-picker {
        width: 260px;
        border-top: none;
        border-left: 1px solid var(--zinc-100);
    }
}

.picker-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--zinc-400);
    margin-bottom: 12px;
}

.picker-preview {
    position: relative;
    margin-bottom: 16px;
}

.picker-preview-color {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 12px;
    border: 1px solid var(--zinc-100);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.2s;
    cursor: pointer;
}

.picker-preview:hover .picker-preview-color {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.picker-hex-label {
    font-size: 11px;
    color: var(--zinc-400);
    font-weight: 600;
    margin-bottom: 6px;
}

.picker-hex-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--zinc-100);
    padding: 6px 0;
    font-size: 16px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--zinc-900);
    outline: none;
    transition: border-color 0.2s;
}

.picker-hex-input:hover {
    border-color: var(--zinc-200);
}

.picker-hex-input:focus {
    border-color: var(--zinc-900);
}

.btn-add-to-collection {
    width: 100%;
    margin-top: 14px;
    padding: 10px;
    background: var(--zinc-900);
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-add-to-collection:hover {
    background: var(--zinc-800);
}

.btn-add-to-collection:active {
    transform: scale(0.95);
}

/* Sidebar Bottom (tips area) */
.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.sidebar-bottom .sidebar-section h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--zinc-500);
    margin-bottom: 10px;
}

.sidebar-bottom .sidebar-section p {
    font-size: 13px;
    color: var(--zinc-500);
    line-height: 1.6;
    font-weight: 400;
    margin-bottom: 16px;
}

.btn-batch-import {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--zinc-200);
    border-radius: 10px;
    color: var(--zinc-900);
    font-weight: 500;
    font-size: 13px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.btn-batch-import:hover {
    background: var(--zinc-50);
}

.tips-card {
    padding: 24px;
    background: var(--zinc-50);
    border-radius: 14px;
    border: 1px solid rgba(244, 244, 245, 0.5);
}

.tips-card ul {
    list-style: none;
    font-size: 13px;
    color: var(--zinc-500);
    font-weight: 400;
}

.tips-card li {
    margin-bottom: 12px;
}

.tips-card li:last-child {
    margin-bottom: 0;
}

.tips-card li span {
    font-weight: 600;
    color: var(--zinc-800);
}

/* ========================================
   Modal
   ======================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
}

.modal-overlay.hidden {
    display: none;
}

.modal {
    width: 100%;
    max-width: 672px;
    border: 1px solid var(--zinc-100);
    background: white;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
    border-radius: 14px;
    overflow: hidden;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--zinc-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--zinc-900);
}

.modal-header p {
    color: var(--zinc-400);
    font-size: 13px;
    font-weight: 400;
    margin-top: 2px;
}

.modal-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--zinc-50);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--zinc-300);
    border: none;
    cursor: pointer;
    transition: color 0.2s;
    font-size: 12px;
}

.modal-close:hover {
    color: var(--zinc-900);
}

.modal-body {
    padding: 24px;
}

.modal-body > div {
    margin-bottom: 24px;
}

.modal-body > div:last-child {
    margin-bottom: 0;
}

.modal-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--zinc-400);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-input {
    width: 100%;
    padding: 8px 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--zinc-100);
    font-size: 15px;
    font-weight: 500;
    color: var(--zinc-900);
    outline: none;
    transition: border-color 0.2s;
}

.modal-input:focus {
    border-color: var(--zinc-900);
}

.modal-input::placeholder {
    color: var(--zinc-300);
}

.modal-textarea {
    width: 100%;
    height: 160px;
    padding: 14px;
    background: var(--zinc-50);
    border: 1px solid var(--zinc-100);
    border-radius: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    resize: none;
    outline: none;
    transition: all 0.2s;
}

.modal-textarea:focus {
    border-color: var(--zinc-900);
    background: white;
}

.modal-footer {
    padding: 16px 24px;
    background: rgba(250, 250, 250, 0.5);
    display: flex;
    gap: 12px;
}

.modal-footer button {
    flex: 1;
    padding: 12px;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-modal-cancel {
    background: transparent;
    color: var(--zinc-400);
}

.btn-modal-cancel:hover {
    color: var(--zinc-900);
}

.btn-modal-confirm {
    background: var(--zinc-900);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-modal-confirm:hover {
    background: var(--zinc-800);
}

.btn-modal-confirm:disabled {
    background: var(--zinc-300);
    cursor: not-allowed;
    box-shadow: none;
}

.modal-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.modal-label-row .modal-label {
    margin-bottom: 0;
}

.btn-toggle-mode {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--zinc-500);
    background: var(--zinc-100);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-toggle-mode:hover {
    background: var(--zinc-200);
    color: var(--zinc-700);
}

.btn-toggle-mode.active {
    background: var(--zinc-900);
    color: white;
}

.hex-only-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 12px;
    font-size: 12px;
    color: var(--zinc-500);
    background: var(--zinc-50);
    border: 1px solid var(--zinc-200);
    border-radius: 8px;
}

.hex-only-notice i {
    color: var(--zinc-400);
}

.btn-modal-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--zinc-100);
    color: var(--zinc-700);
    border-radius: 10px;
}

.btn-modal-copy:hover {
    background: var(--zinc-200);
}

/* Tag Modal */
.tag-input-row {
    display: flex;
    gap: 8px;
}

.tag-modal-existing {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 32px;
}

.tag-modal-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    border: 1.5px solid var(--zinc-200);
    color: var(--zinc-600);
    background: white;
}

.tag-modal-chip:hover {
    border-color: var(--zinc-400);
}

.tag-modal-chip.selected {
    color: white;
    border-color: transparent;
}

.tag-modal-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 32px;
}

/* ========================================
   Share Page
   ======================================== */
.share-page {
    max-width: 640px;
    margin: 0 auto;
    padding: 48px 24px;
    min-height: 100vh;
    background: var(--zinc-50);
}

.share-nav {
    margin-bottom: 40px;
}

.share-back-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--zinc-500);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s;
}

.share-back-link:hover {
    color: var(--zinc-900);
}

.share-back-link i {
    font-size: 18px;
}

.share-back-logo {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--zinc-900);
}

.share-back-sub {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--zinc-900);
    margin-left: 6px;
}

.share-card {
    border: 1px solid var(--zinc-100);
    border-radius: 16px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.share-card-header {
    padding: 28px 28px 20px;
    border-bottom: 1px solid var(--zinc-100);
}

.share-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--zinc-900);
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.share-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.share-tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    background: #a1a1aa;
}

.share-meta {
    font-size: 12px;
    color: var(--zinc-400);
    font-weight: 500;
}

.share-swatches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    padding: 24px 28px;
}

.share-swatch {
    text-align: center;
}

.share-swatch-color {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 10px;
    border: 1px solid var(--zinc-100);
    margin-bottom: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.share-swatch-info {
    padding: 0 2px;
}

.share-swatch-hex {
    display: block;
    font-size: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 600;
    color: var(--zinc-900);
    text-transform: uppercase;
}

.share-swatch-name {
    display: block;
    font-size: 11px;
    color: var(--zinc-400);
    font-weight: 500;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-action {
    padding: 20px 28px;
    border-top: 1px solid var(--zinc-100);
    background: rgba(250, 250, 250, 0.5);
    text-align: center;
}

.share-btn-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 28px;
    font-size: 14px;
    font-weight: 600;
    background: var(--zinc-900);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.share-btn-copy:hover {
    background: var(--zinc-700);
}

.share-btn-copy:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.share-btn-success {
    background: #22c55e !important;
}

.share-btn-success:hover {
    background: #16a34a !important;
}

.share-login-hint {
    font-size: 14px;
    color: var(--zinc-500);
}

.share-login-link {
    color: var(--zinc-900);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.share-error-card {
    text-align: center;
    padding: 80px 24px;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--zinc-100);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.share-error-card i {
    font-size: 36px;
    color: var(--zinc-300);
    margin-bottom: 16px;
    display: block;
}

.share-error-card p {
    font-size: 15px;
    color: var(--zinc-500);
    margin-bottom: 20px;
}

.share-error-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--zinc-700);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Share Code Block */
.share-code-section {
    margin-top: 32px;
    border-top: 1px solid var(--zinc-100);
    padding-top: 32px;
}

.share-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 0 12px;
}

.share-code-header span {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--zinc-400);
}

.btn-copy-code {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--zinc-100);
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--zinc-600);
    cursor: pointer;
    transition: all 0.15s;
}

.btn-copy-code:hover {
    background: var(--zinc-200);
    color: var(--zinc-800);
}

.btn-copy-code i {
    font-size: 13px;
}

.share-code-block {
    background: var(--zinc-50);
    color: var(--zinc-600);
    border: 1px solid var(--zinc-200);
    padding: 20px 24px;
    border-radius: 10px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    line-height: 2.2;
    overflow-x: auto;
    white-space: pre;
    margin: 0;
}

.share-code-block code {
    font-family: inherit;
    font-size: inherit;
}

/* Share Toast */
.share-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 10px 20px;
    background: var(--zinc-900);
    color: white;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.share-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ========================================
   Utilities
   ======================================== */
.hidden {
    display: none !important;
}

.hidden-input {
    display: none;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 18px;
    background: var(--zinc-900);
    color: white;
    font-size: 12px;
    font-weight: 500;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 200;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
}

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

/* ========================================
   Landing Page
   ======================================== */

/* SVG Filters (hidden) */
.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* Animated Gradient Background - D1 Flowing Mesh */
.landing-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
    background: #fafaf9;
}

.landing-bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
}

/* Grain/Noise Overlay */
.landing-bg-noise {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.08;
    pointer-events: none;
}

/* 霧灰藍 */
.landing-bg-blob:nth-child(1) {
    width: 600px;
    height: 600px;
    background: #B8C5D0;
    top: -10%;
    left: -5%;
    animation: blobFloat1 10s ease-in-out infinite;
}

/* 乾燥玫瑰 */
.landing-bg-blob:nth-child(2) {
    width: 500px;
    height: 500px;
    background: #D4B5B5;
    top: 10%;
    right: -10%;
    animation: blobFloat2 12s ease-in-out infinite;
}

/* 灰綠 */
.landing-bg-blob:nth-child(3) {
    width: 550px;
    height: 550px;
    background: #A8B5A0;
    bottom: -15%;
    left: 20%;
    animation: blobFloat3 11s ease-in-out infinite;
}

/* 暖灰 */
.landing-bg-blob:nth-child(4) {
    width: 450px;
    height: 450px;
    background: #C9C0B8;
    bottom: 20%;
    right: 10%;
    animation: blobFloat4 9s ease-in-out infinite;
}

@keyframes blobFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
    25% { transform: translate(200px, 100px) scale(1.15) rotate(10deg); }
    50% { transform: translate(120px, 180px) scale(0.9) rotate(-5deg); }
    75% { transform: translate(-80px, 120px) scale(1.1) rotate(8deg); }
}

@keyframes blobFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
    25% { transform: translate(-150px, 150px) scale(0.85) rotate(-12deg); }
    50% { transform: translate(-200px, 50px) scale(1.1) rotate(6deg); }
    75% { transform: translate(100px, -100px) scale(0.95) rotate(-8deg); }
}

@keyframes blobFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
    25% { transform: translate(180px, -120px) scale(1.1) rotate(8deg); }
    50% { transform: translate(80px, -200px) scale(0.9) rotate(-10deg); }
    75% { transform: translate(-120px, -80px) scale(1.05) rotate(5deg); }
}

@keyframes blobFloat4 {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
    25% { transform: translate(-100px, -130px) scale(1.15) rotate(-8deg); }
    50% { transform: translate(150px, -60px) scale(0.85) rotate(12deg); }
    75% { transform: translate(180px, 100px) scale(1.05) rotate(-6deg); }
}

.landing-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.landing-content {
    max-width: 560px;
    text-align: center;
}

.landing-logo {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}

.landing-logo span {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--zinc-900);
}

.landing-tagline {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 32px;
    font-weight: 700;
    color: var(--zinc-900);
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.landing-tagline span:first-child {
    font-size: 18px;
    font-weight: 500;
    color: var(--zinc-500);
    letter-spacing: 0.05em;
}

.landing-description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--zinc-500);
    margin-bottom: 36px;
}

.landing-cta {
    display: inline-block;
    padding: 12px 32px;
    background: var(--zinc-900);
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.15s;
    margin-bottom: 48px;
}

.landing-cta:hover {
    background: var(--zinc-700);
}

.landing-features {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    margin-top: 40px;
    margin-bottom: 20px;
}

.landing-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.landing-feature i {
    font-size: 20px;
    color: var(--zinc-400);
}

.landing-feature span {
    font-size: 12px;
    font-weight: 500;
    color: var(--zinc-500);
}

/* Landing Video */
.landing-video-section {
    width: 90vw;
    max-width: 1200px;
    margin: 60px auto 0;
    margin-left: 50%;
    transform: translateX(-50%);
}

.landing-video {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.15);
}

.landing-video-section.video-fade-in {
    animation: videoFadeIn 0.6s ease forwards;
}

@keyframes videoFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Landing Carousel */
.landing-carousel {
    width: 90vw;
    max-width: 1200px;
    margin: 48px auto 60px;
    margin-left: 50%;
    transform: translateX(-50%);
}

.carousel-container {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    background: var(--zinc-100);
}

.carousel-slide {
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    position: absolute;
    top: 0;
    left: 0;
}

.carousel-slide:first-child {
    position: relative;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: var(--zinc-300);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.carousel-dot:hover {
    background: var(--zinc-400);
}

.carousel-dot.active {
    background: var(--zinc-600);
    transform: scale(1.2);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox.hidden {
    display: none;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.2s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background 0.2s;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.lightbox-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
}

.lightbox-dot:hover {
    border-color: rgba(255, 255, 255, 0.8);
}

.lightbox-dot.active {
    background: white;
    border-color: white;
}

/* Landing Responsive */
@media (max-width: 768px) {
    .landing-video-section,
    .landing-carousel {
        width: 94vw;
    }

    .landing-video,
    .carousel-container {
        border-radius: 12px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
}

.landing-footer {
    margin-top: auto;
    padding-top: 60px;
    font-size: 11px;
    color: var(--zinc-400);
    letter-spacing: 0.02em;
}

.landing-footer a {
    color: var(--zinc-400);
    text-decoration: none;
    transition: color 0.15s;
}

.landing-footer a:hover {
    color: var(--zinc-600);
}

/* ========================================
   Site Footer
   ======================================== */
.site-footer {
    text-align: center;
    padding: 60px 20px 40px;
    font-size: 11px;
    color: var(--zinc-400);
    letter-spacing: 0.02em;
}

.site-footer a {
    color: var(--zinc-400);
    text-decoration: none;
    transition: color 0.15s;
}

.site-footer a:hover {
    color: var(--zinc-600);
}

/* ========================================
   Pickr Overrides
   ======================================== */
.pickr {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    visibility: hidden !important;
}

.pcr-app {
    z-index: 1000 !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid var(--zinc-200) !important;
    transition: none !important;
    animation: none !important;
}

.pcr-app[data-theme='nano'] .pcr-interaction input {
    font-size: 13px !important;
    border-radius: 6px !important;
}

.pcr-app[data-theme='nano'] .pcr-interaction .pcr-save {
    background: var(--zinc-900) !important;
    color: white !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
}

.pcr-app[data-theme='nano'] .pcr-interaction .pcr-save:hover {
    background: var(--zinc-700) !important;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .logo-subtitle {
        display: none;
    }

    .header-links {
        display: none;
    }

    .header-user {
        border-left: none;
        padding-left: 0;
    }

    .user-email {
        display: none;
    }

    .sidebar {
        transform: translateX(calc(-1 * var(--sidebar-width)));
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    main {
        margin-left: 0 !important;
    }

    .palette-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .palette-header-right {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .palette-count {
        display: none;
    }

    .swatch {
        width: calc(33% - 8px);
    }

    .search-container {
        max-width: 200px;
    }
}
