/* Color Picker Styles */
.color-picker {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.generator-container {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .generator-container {
        grid-template-columns: 1fr;
    }
}

/* Input Section */
.input-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px var(--shadow);
    height: fit-content;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

input[type="color"] {
    width: 80px;
    height: 80px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
    padding: 0;
}

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

input[type="color"]::-webkit-color-swatch {
    border: 2px solid var(--border);
    border-radius: 8px;
}

.color-preview {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 2px solid var(--border);
    transition: transform 0.2s ease;
}

.input-with-button {
    display: flex;
    gap: 0.5rem;
}

.input-with-button input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--background);
    color: var(--text-primary);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.input-with-button input:focus {
    border-color: var(--primary);
}

.copy-btn {
    padding: 0.75rem;
    background: var(--primary);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 0.875rem;
}

.copy-btn:hover {
    background: #005a9e;
}

/* Options Group */
.options-group {
    margin-bottom: 1.5rem;
}

.options-group .option-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.options-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.options-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

/* Format Options */
.format-options {
    margin-bottom: 1.5rem;
}

.format-options > label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.format-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.format-btn {
    padding: 0.75rem;
    border: 1px solid var(--border);
    background: var(--background);
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.format-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.format-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
}

/* Output Section */
.output-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.color-display {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    min-height: 200px;
    transition: border-color 0.3s ease;
}

.main-color-info {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.color-sample-large {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    border: 2px solid var(--border);
    box-shadow: 0 4px 12px var(--shadow);
}

.color-details h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.color-values {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.color-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-value .label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    min-width: 60px;
}

.color-value .value {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.875rem;
    color: var(--text-primary);
    background: var(--background);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border);
}

/* Color Controls */
.color-controls {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.stats-bar {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary);
}

.color-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-outline {
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

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

/* Templates Section (Color Schemes) */
.templates-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.templates-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.color-schemes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.scheme-group {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
}

.scheme-group h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.color-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.color-swatch:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
    border-color: var(--primary);
}

.color-swatch::after {
    content: attr(data-color);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 0.7rem;
    padding: 2px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-family: 'Consolas', 'Monaco', monospace;
}

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

/* History Section */
.history-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
}

.history-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.history-list {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    min-height: 60px;
}

.history-item {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.history-item:hover {
    transform: scale(1.1);
}

.history-swatch {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    border: 2px solid var(--border);
}

.history-swatch::after {
    content: attr(data-color);
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--background);
    color: var(--text-primary);
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10;
    font-family: 'Consolas', 'Monaco', monospace;
    border: 1px solid var(--border);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .color-picker {
        padding: 1rem;
    }
    
    .input-section,
    .color-display,
    .color-controls,
    .templates-section,
    .history-section {
        padding: 1.5rem;
    }
    
    .format-buttons,
    .color-actions {
        flex-direction: column;
    }
    
    .stats-bar {
        flex-direction: column;
        align-items: center;
    }
    
    .color-schemes {
        grid-template-columns: 1fr;
    }
    
    .main-color-info {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .color-sample-large {
        margin: 0 auto;
    }
}

/* Animations */
.color-display {
    animation: fadeIn 0.5s ease;
}

.history-item {
    animation: slideUp 0.3s ease;
}

.color-swatch {
    animation: fadeIn 0.5s ease;
}

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

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

/* Loading state */
.generating {
    position: relative;
    overflow: hidden;
}

.generating::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    to {
        left: 100%;
    }
}

/* Print styles */
@media print {
    .tool-header,
    .tool-footer,
    .input-section,
    .color-controls,
    .templates-section,
    .history-section {
        display: none;
    }
    
    .generator-container {
        grid-template-columns: 1fr;
    }
    
    .color-display {
        border: none;
        box-shadow: none;
    }
}

/* CSS Variables (will be overridden by layout.css) */
:root {
    --background: #ffffff;
    --surface: #f8fafc;
    --border: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --primary: #0f4ba5;
    --shadow: rgba(0, 0, 0, 0.1);
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
