/* Palette Craft - Custom Styles */

:root {
    --transition-speed: 0.3s;
}

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.app-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
}

.app-header h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

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

/* Controls */
.controls {
    margin-bottom: 30px;
}

.control-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.control-group select {
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 1rem;
    min-width: 150px;
    cursor: pointer;
}

.color-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-input-wrapper input[type="color"] {
    width: 50px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
}

.generate-btn {
    margin-left: auto;
    padding: 12px 30px;
    font-size: 1.1rem;
}

/* Palette Display */
.palette-container {
    margin-bottom: 30px;
    min-height: 300px;
}

.palette-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.palette-row {
    display: flex;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

.color-card {
    flex: 1;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    position: relative;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    cursor: pointer;
}

.color-card:hover {
    transform: translateY(-5px);
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.color-card-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.color-hex {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.color-actions button {
    padding: 8px 12px;
    font-size: 0.85rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-speed);
    opacity: 0.9;
}

.color-actions button:hover {
    opacity: 1;
    transform: scale(1.05);
}

.lock-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.lock-btn.locked {
    background: rgba(255, 200, 0, 0.3);
}

/* Color Info Panel */
.color-info-panel {
    margin-bottom: 20px;
}

.color-info-content {
    display: grid;
    grid-template-columns: 100px 1fr 200px;
    gap: 30px;
    align-items: start;
}

.color-preview {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.color-values {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.value-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.value-row .label {
    color: var(--text-muted);
    width: 50px;
    font-size: 0.9rem;
}

.value-row .value {
    font-family: 'Monaco', 'Menlo', monospace;
    color: var(--text-primary);
}

.copy-btn {
    padding: 4px 8px !important;
    font-size: 0.8rem !important;
}

.contrast-info {
    padding: 15px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.contrast-info h4 {
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.contrast-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.wcag-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}

.wcag-badge.aa {
    background: #22c55e;
    color: white;
}

.wcag-badge.aaa {
    background: #3b82f6;
    color: white;
}

.wcag-badge.fail {
    background: #ef4444;
    color: white;
}

/* Export Panel */
.export-panel {
    margin-bottom: 20px;
}

.export-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.export-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.export-output {
    position: relative;
}

.export-output pre {
    background: var(--bg-tertiary);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-primary);
    max-height: 300px;
    overflow-y: auto;
}

#copy-export-btn {
    margin-top: 10px;
}

/* Saved Palettes */
.saved-palettes {
    margin-bottom: 20px;
}

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

.saved-count {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.saved-list {
    display: grid;
    gap: 15px;
}

.no-saved {
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
}

.saved-palette {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.saved-palette-colors {
    display: flex;
    flex: 1;
    gap: 5px;
}

.saved-palette-color {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
    transition: transform var(--transition-speed);
}

.saved-palette-color:hover {
    transform: scale(1.1);
}

.saved-palette-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.saved-palette-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

/* Footer */
.app-footer {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .control-row {
        flex-direction: column;
    }

    .generate-btn {
        width: 100%;
        margin-left: 0;
    }

    .color-info-content {
        grid-template-columns: 1fr;
    }

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

    .palette-row {
        flex-direction: column;
    }

    .color-card {
        min-height: 150px;
    }

    .export-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
