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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* For generator page - keep the original overflow behavior */
body.generator-page {
    overflow: hidden;
    height: 100vh;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    gap: 2rem;
}

.logo h1 {
    font-size: 1.5rem;
    color: #333;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: #666;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #5e60ce;
    background: rgba(94, 96, 206, 0.1);
}

.nav-link.active {
    color: #5e60ce;
    background: rgba(94, 96, 206, 0.15);
}

.controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.harmony-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.harmony-selector label {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.harmony-dropdown {
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
}

.harmony-dropdown:hover {
    border-color: #5e60ce;
}

.harmony-dropdown:focus {
    outline: none;
    border-color: #5e60ce;
    box-shadow: 0 0 0 3px rgba(94, 96, 206, 0.1);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #5e60ce;
    color: white;
}

.btn-primary:hover {
    background: #4c4eb8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(94, 96, 206, 0.4);
}

.btn-secondary {
    background: #48cae4;
    color: white;
}

.btn-secondary:hover {
    background: #00b4d8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 202, 228, 0.4);
}

/* Palette Container */
.palette-container {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.color-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-card:hover {
    transform: scale(1.02);
}

.color-card.locked {
    cursor: default;
}

.color-card.locked::after {
    content: '🔒';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.color-card:not(.locked)::after {
    content: '🔓';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.color-card:not(.locked):hover::after {
    opacity: 0.7;
}

.color-info {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
    transition: all 0.3s ease;
}

.color-card:hover .color-info {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.hex-code {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    user-select: all;
}

.hex-code:hover {
    color: #5e60ce;
}

.rgb-code {
    font-size: 0.875rem;
    color: #666;
    font-family: 'Courier New', monospace;
}

/* Info Bar */
.info-bar {
    background: #f8f9fa;
    padding: 0.75rem 2rem;
    text-align: center;
    color: #666;
    font-size: 0.875rem;
    border-top: 1px solid #e0e0e0;
}

kbd {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.125rem 0.5rem;
    font-family: monospace;
    font-size: 0.875rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover {
    color: #000;
}

.modal h2 {
    margin-bottom: 1.5rem;
    color: #333;
}

.export-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.export-section h3 {
    font-size: 1rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.export-input-group {
    display: flex;
    gap: 0.5rem;
}

.export-input-group input,
.export-input-group textarea {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    resize: none;
}

.btn-copy {
    padding: 0.75rem 1rem;
    background: #5e60ce;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-copy:hover {
    background: #4c4eb8;
}

.btn-copy.copied {
    background: #06d6a0;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100px);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* SEO Content - Hidden but accessible to crawlers */
.seo-content {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .controls {
        flex-direction: column;
        width: 100%;
    }

    .harmony-selector {
        width: 100%;
        justify-content: space-between;
    }

    .harmony-dropdown {
        flex: 1;
    }
    
    .palette-container {
        flex-direction: column;
    }
    
    .color-info {
        padding: 0.75rem 1.5rem;
    }
    
    .hex-code {
        font-size: 1.25rem;
    }
}
