/* CSS Reset and Base Styles */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-bg: #f5f5f7;
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --accent-color: #007aff;
    --accent-hover: #0056b3;
    --danger-color: #ff3b30;
    --danger-hover: #d32f2f;
    --success-color: #34c759;
    --border-radius: 16px;
    --border-radius-sm: 12px;
    --border-radius-xs: 8px;
    --transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(180deg, #ffffff 0%, #f5f5f7 50%, #e8e8ed 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* App Container */
.app-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 32px;
}

.logo {
    max-width: 280px;
    height: auto;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Mode Selector */
.mode-selector-wrapper {
    position: relative;
}

.mode-tabs {
    position: absolute;
    top: 100%;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    margin-top: 8px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.mode-tabs.expanded {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mode-tab {
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
    white-space: nowrap;
    text-align: left;
}

.mode-tab:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.04);
}

.mode-tab.active {
    background: linear-gradient(135deg, #c4b5fd 0%, #a78bfa 50%, #8b5cf6 100%);
    color: white;
}

.mode-selected {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #c4b5fd 0%, #a78bfa 50%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.mode-selected:hover {
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

.mode-expand-icon {
    transition: transform 0.3s ease;
}

.mode-selector-wrapper.expanded .mode-expand-icon {
    transform: rotate(180deg);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.action-buttons .glass-btn {
    flex: 1;
    min-width: 140px;
}

.mode-selector-wrapper {
    flex-shrink: 0;
}

.glass-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--glass-shadow);
}

.glass-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.85);
}

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

.glass-btn svg {
    opacity: 0.7;
}

/* Palettes Container */
.palettes-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Palette Card */
.palette-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
    animation: slideIn 0.3s ease-out;
}

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

.palette-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.palette-card.starred {
    border-color: #ffd700;
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.15);
}

.palette-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.palette-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    margin: -4px -8px;
    border-radius: 6px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.palette-name:hover {
    background: rgba(0, 0, 0, 0.04);
}

.palette-name:focus {
    outline: none;
    border-color: var(--accent-color);
    background: white;
}

.palette-actions {
    display: flex;
    gap: 8px;
}

.palette-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
}

.palette-action-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-primary);
}

.palette-action-btn.star-btn.active {
    color: #ffd700;
}

.palette-action-btn.star-btn.active svg {
    fill: #ffd700;
}

.palette-action-btn.delete-btn:hover {
    color: var(--danger-color);
}

/* Color Swatches */
.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.color-swatch {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.8);
    position: relative;
}

.color-swatch:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.color-swatch:active {
    transform: scale(1.05);
}

.color-swatch.copied::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Color Delete Button */
.color-delete-btn {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 59, 48, 0.9);
    border: 2px solid white;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: var(--transition);
    z-index: 10;
    padding: 0;
}

.color-swatch:hover .color-delete-btn {
    opacity: 1;
    transform: scale(1);
}

.color-delete-btn:hover {
    background: var(--danger-color);
    transform: scale(1.1);
}

/* Color Drag States */
.color-swatch[draggable="true"] {
    cursor: grab;
}

.color-swatch[draggable="true"]:active {
    cursor: grabbing;
}

.color-swatch.color-dragging {
    opacity: 0.4;
    transform: scale(0.9);
}

.color-swatch.color-drag-over {
    transform: scale(1.1);
}

.color-swatch.color-drag-over-left {
    box-shadow: -3px 0 0 0 var(--accent-color), 0 2px 8px rgba(0, 0, 0, 0.15);
}

.color-swatch.color-drag-over-right {
    box-shadow: 3px 0 0 0 var(--accent-color), 0 2px 8px rgba(0, 0, 0, 0.15);
}

.add-color-swatch {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px dashed var(--text-secondary);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

/* Color Add Input */
.color-add-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.color-add-picker {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
}

.color-add-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-add-picker::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

.color-add-hex {
    width: 90px;
    padding: 8px 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'SF Mono', Monaco, monospace;
    text-transform: uppercase;
}

.color-add-hex:focus {
    outline: none;
    border-color: var(--accent-color);
}

.color-add-confirm,
.color-add-cancel {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.color-add-confirm:hover {
    background: rgba(52, 199, 89, 0.1);
    color: var(--success-color);
}

.color-add-cancel:hover {
    background: rgba(255, 59, 48, 0.1);
    color: var(--danger-color);
}

.add-color-swatch:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: scale(1.1);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    color: white;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.glass-modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .glass-modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

.modal-content {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px 24px;
}

/* Settings Modal */
.setting-group {
    margin-bottom: 28px;
}

.setting-group:last-child {
    margin-bottom: 0;
}

.setting-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 14px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.radio-option:hover {
    background: rgba(0, 0, 0, 0.06);
}

.radio-option input {
    display: none;
}

.radio-custom {
    width: 22px;
    height: 22px;
    border: 2px solid var(--text-secondary);
    border-radius: 50%;
    position: relative;
    transition: var(--transition);
}

.radio-option input:checked + .radio-custom {
    border-color: var(--accent-color);
}

.radio-option input:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: var(--accent-color);
    border-radius: 50%;
}

.radio-label {
    font-weight: 500;
    flex: 1;
}

.radio-example {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: 'SF Mono', Monaco, monospace;
}

.data-buttons {
    display: flex;
    gap: 12px;
}

.data-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: rgba(0, 0, 0, 0.03);
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.data-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

.data-btn.danger-btn {
    color: var(--danger-color);
    width: 100%;
}

.data-btn.danger-btn:hover {
    background: rgba(255, 59, 48, 0.1);
}

/* Palette Modal */
.palette-modal {
    max-width: 500px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.glass-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 1rem;
    color: var(--text-primary);
    transition: var(--transition);
    font-family: inherit;
}

.glass-input:focus {
    outline: none;
    background: white;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.glass-input::placeholder {
    color: var(--text-secondary);
}

.colors-editor label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.color-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
    max-height: 250px;
    overflow-y: auto;
}

.color-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 12px;
}

.color-picker-wrapper {
    position: relative;
    width: 36px;
    height: 36px;
}

.color-picker-wrapper input[type="color"] {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
}

.color-picker-wrapper input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-wrapper input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

.color-hex-input {
    flex: 1;
    padding: 10px 12px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'SF Mono', Monaco, monospace;
    color: var(--text-primary);
    text-transform: uppercase;
}

.color-hex-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.remove-color-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition);
}

.remove-color-btn:hover {
    background: rgba(255, 59, 48, 0.1);
    color: var(--danger-color);
}

.add-color-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: transparent;
    border: 2px dashed rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.add-color-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(0, 122, 255, 0.05);
}

/* Modal Buttons */
.cancel-btn {
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.cancel-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-primary);
}

.save-btn {
    padding: 12px 24px;
    background: var(--accent-color);
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.save-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.modal-footer .delete-btn {
    padding: 12px 24px;
    background: var(--danger-color);
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.modal-footer .delete-btn:hover {
    background: var(--danger-hover);
}

/* Delete Modal */
.delete-modal {
    max-width: 380px;
}

.delete-message {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Shades Modal */
.shades-modal {
    max-width: 480px;
}

.base-color-display {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 14px;
    margin-bottom: 24px;
}

.base-color-swatch {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.base-color-value {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 1rem;
    color: var(--text-primary);
}

.shades-section {
    margin-bottom: 24px;
}

.shades-section:last-child {
    margin-bottom: 0;
}

.shades-section h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shades-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.shade-swatch {
    aspect-ratio: 1;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 6px;
    overflow: hidden;
}

.shade-swatch::after {
    content: attr(data-value);
    font-size: 0.65rem;
    font-family: 'SF Mono', Monaco, monospace;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: var(--transition);
}

.shade-swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.shade-swatch:hover::after {
    opacity: 1;
}

.shade-swatch.copied::before {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Harmony Modal */
.harmony-modal {
    max-width: 480px;
}

.harmony-section {
    margin-bottom: 24px;
}

.harmony-section h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.harmony-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.harmony-swatch {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 6px;
    overflow: hidden;
}

.harmony-swatch::after {
    content: attr(data-value);
    font-size: 0.6rem;
    font-family: 'SF Mono', Monaco, monospace;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: var(--transition);
}

.harmony-swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.harmony-swatch:hover::after {
    opacity: 1;
}

.harmony-swatch.copied::before {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state-icon svg {
    color: white;
    opacity: 0.9;
}

.empty-state h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Drag and Drop Styles */
.palette-card.dragging {
    opacity: 0.5;
    transform: scale(1.02);
}

.palette-card.drag-over {
    border-color: var(--accent-color);
    background: rgba(0, 122, 255, 0.05);
}

/* Responsive Styles - Tablet */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .glass-btn {
        flex: none;
        width: 100%;
    }

    .mode-selector-wrapper {
        width: 100%;
    }

    .mode-selected {
        width: 100%;
        justify-content: center;
    }

    .mode-tabs {
        left: 0;
        right: 0;
        width: 100%;
    }
}

/* Responsive Styles - Mobile */
@media (max-width: 480px) {
    .app-container {
        padding: 24px 16px;
    }

    .title {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .mode-tab {
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    .mode-selected {
        padding: 14px 18px;
        font-size: 0.9rem;
    }

    .glass-btn {
        padding: 14px 18px;
        font-size: 0.9rem;
    }

    .palette-card {
        padding: 16px;
    }

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

    .palette-actions {
        align-self: flex-end;
    }

    .color-swatch {
        width: 38px;
        height: 38px;
    }

    .glass-modal {
        border-radius: 16px;
        margin: 10px;
    }

    .modal-header {
        padding: 20px 20px 0;
    }

    .modal-content {
        padding: 20px;
    }

    .modal-footer {
        padding: 12px 20px 20px;
    }

    .data-buttons {
        flex-direction: column;
    }

    .shades-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Focus Visible for Accessibility */
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: rgba(0, 122, 255, 0.2);
}

/* Footer */
.footer {
    text-align: center;
    padding: 32px 0 16px;
    margin-top: 40px;
}

.footer p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--accent-color);
}
