:root {
    --bg-primary: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Navbar */
.navbar {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
    background: white;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 24px;
}

.logo-text {
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.025em;
}

.global-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.select-harmony {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    background-color: #f9fafb;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    outline: none;
}

.btn-primary {
    background-color: var(--text-primary);
    color: white;
}

.btn-primary:hover {
    background-color: #333;
}

.btn-secondary {
    background-color: #f3f4f6;
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

.shortcut {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    margin-left: 4px;
}

/* Palette Container */
.palette-container {
    flex: 1;
    display: flex;
    width: 100%;
}

.color-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 80px;
    position: relative;
    transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.color-actions {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.color-column:hover .color-actions {
    opacity: 1;
    transform: translateY(0);
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    color: inherit;
}

.action-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.color-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.hex-value {
    font-size: 28px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    margin-bottom: 8px;
}

.color-format-info {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.2s;
}

.color-format-info:hover {
    opacity: 1;
}

.color-name {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.7;
}

/* Adjustment Panel */
.adjustment-panel {
    position: absolute;
    bottom: 250px;
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    gap: 12px;
    width: 200px;
    z-index: 5;
    color: var(--text-primary);
}

.adjustment-panel.active {
    display: flex;
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.slider-group label {
    font-size: 12px;
    font-weight: 600;
}

.slider-group input {
    width: 100%;
    cursor: pointer;
    accent-color: var(--accent);
    height: 6px;
    border-radius: 3px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

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

.close-modal-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
}

.export-body {
    padding: 24px;
}

.export-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.export-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-weight: 600;
}

.export-action-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background-color: rgba(59, 130, 246, 0.05);
}

.css-preview {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.css-preview label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

#cssOutput {
    background: #f3f4f6;
    padding: 16px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 13px;
    white-space: pre-wrap;
    max-height: 150px;
    overflow-y: auto;
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
}

.toast {
    background: #1a1a1a;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease-out, toastOut 0.3s ease-in 2.7s forwards;
}

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

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

/* Mobile Adjustments */
@media (max-width: 768px) {
    .palette-container {
        flex-direction: column;
    }

    .color-column {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 24px;
        height: 20%;
    }

    .color-actions {
        flex-direction: row;
        margin-bottom: 0;
        opacity: 1;
        transform: none;
    }

    .adjustment-panel {
        bottom: auto;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .btn-text, .shortcut {
        display: none;
    }

    .navbar {
        padding: 0 16px;
    }

    .hex-value {
        font-size: 20px;
    }
}
