/* Color Picker Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg: #0f172a;
    --bg-card: #1e293b;
    --bg-input: #334155;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #475569;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #f59e0b, #ef4444, #ec4899, #8b5cf6, #3b82f6, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.badges {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-green { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge-blue { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.badge-purple { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }

.calculator-card {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

/* Color Preview */
.color-preview-section {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    position: relative;
}

.color-preview {
    width: 150px;
    height: 150px;
    border-radius: 1rem;
    background: #6366f1;
    border: 4px solid var(--border);
    cursor: pointer;
}

#color-input {
    position: absolute;
    width: 150px;
    height: 150px;
    opacity: 0;
    cursor: pointer;
}

/* Color Values */
.color-values {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

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

.value-input {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    overflow: hidden;
}

.value-input .hash {
    padding: 0.75rem;
    background: var(--border);
    color: var(--text-muted);
    font-weight: 600;
}

.value-input input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 1.1rem;
    font-family: monospace;
    outline: none;
    text-transform: lowercase;
}

.rgb-inputs, .hsl-inputs {
    display: flex;
    gap: 0.5rem;
}

.rgb-input, .hsl-input {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    overflow: hidden;
}

.rgb-label, .hsl-label {
    padding: 0.75rem;
    background: var(--border);
    color: var(--text-muted);
    font-weight: 600;
    min-width: 35px;
    text-align: center;
}

.rgb-input input, .hsl-input input {
    flex: 1;
    padding: 0.75rem 0.5rem;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 1rem;
    outline: none;
    min-width: 0;
}

.copy-btn {
    padding: 0.75rem 1rem;
    background: var(--primary);
    border: none;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 1rem;
}

.copy-btn:hover {
    background: var(--primary-hover);
}

/* Copy Formats */
.copy-formats {
    margin-bottom: 1.5rem;
}

.copy-formats h4 {
    text-align: center;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

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

.format-btn {
    flex: 1;
    min-width: 150px;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text);
    font-family: monospace;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.format-btn:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

/* Color Palette */
.color-palette h4 {
    text-align: center;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 0.5rem;
}

.palette-color {
    aspect-ratio: 1;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s;
    border: 2px solid transparent;
}

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

/* Features */
.features {
    margin-bottom: 2rem;
}

.features h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

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

.feature {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    text-align: center;
    transition: transform 0.2s;
}

.feature:hover {
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
}

.feature h3 {
    margin-bottom: 0.5rem;
    color: var(--text);
}

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

/* FAQ */
.faq {
    margin-bottom: 2rem;
}

.faq h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

.faq-category {
    margin-bottom: 1.5rem;
}

.faq-category-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
    color: var(--primary);
}

.faq-item {
    background: var(--bg-card);
    padding: 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border);
}

.faq-item h4 {
    margin-bottom: 0.5rem;
    color: var(--text);
}

.faq-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

footer p:first-child {
    color: var(--text);
    margin-bottom: 0.25rem;
}

@media (max-width: 600px) {
    h1 { font-size: 2rem; }
    .calculator-card { padding: 1.5rem; }
    .format-buttons { flex-direction: column; }
    .palette-grid { grid-template-columns: repeat(5, 1fr); }
    .rgb-inputs, .hsl-inputs { flex-wrap: wrap; }
    .rgb-input, .hsl-input { min-width: calc(33% - 0.5rem); }
}
