/**
 * Licznik na Bloga - Style
 * https://liczniknabloga.co.pl/
 */

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

:root {
    --primary: #667eea;
    --bg: #0f172a;
    --bg-light: #1e293b;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #22d3ee;
    --success: #10b981;
}

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

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* Hero */
.hero {
    padding: 4rem 0 3rem;
    text-align: center;
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-light) 100%);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.badge {
    display: inline-block;
    background: var(--bg-light);
    border: 1px solid var(--primary);
    color: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

/* Configurator */
.configurator-section {
    padding: 4rem 0;
    background: var(--bg-light);
}
.configurator-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.configurator {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: var(--bg);
    border-radius: 16px;
    padding: 2rem;
}

@media (max-width: 768px) {
    .configurator {
        grid-template-columns: 1fr;
    }
}

.config-panel h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

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

.config-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.config-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.config-option {
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    border: 2px solid transparent;
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.config-option:hover {
    border-color: var(--primary);
}

.config-option.active {
    border-color: var(--accent);
    background: rgba(34, 211, 238, 0.1);
}

.theme-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    position: relative;
}

.theme-option::after {
    content: attr(data-name);
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
}

.theme-option:hover::after,
.theme-option.active::after {
    opacity: 1;
}

.theme-option.active {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px var(--accent);
}

/* Color swatches */
.color-swatch, .gradient-swatch {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 2px solid rgba(255,255,255,0.2);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.color-swatch:hover, .gradient-swatch:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Theme colors */
.theme-light { background: #ffffff; border-color: #e0e0e0; }
.theme-dark { background: #1a1a2e; }
.theme-ocean { background: linear-gradient(135deg, #667eea, #764ba2); }
.theme-sunset { background: linear-gradient(135deg, #f093fb, #f5576c); }
.theme-forest { background: #1d4e1d; }
.theme-grape { background: linear-gradient(135deg, #5b247a, #1bcedf); }
.theme-coral { background: #ff6b6b; }
.theme-midnight { background: linear-gradient(135deg, #0f0c29, #302b63); }
.theme-mint { background: #00b894; }
.theme-rose { background: linear-gradient(135deg, #ffecd2, #fcb69f); }

.preview-panel {
    display: flex;
    flex-direction: column;
}

.preview-panel h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.preview-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 12px;
    padding: 2rem;
    min-height: 200px;
}

/* Code output */
.code-output {
    margin-top: 2rem;
}

.code-output h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.copy-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: #5a67d8;
}

.copy-btn.copied {
    background: var(--success);
}

.code-box {
    background: #0d1117;
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    color: #e6edf3;
}

.code-box .comment { color: #6a737d; }
.code-box .tag { color: #7ee787; }
.code-box .attr { color: #79c0ff; }
.code-box .string { color: #a5d6ff; }

/* Steps */
.how-section { padding: 4rem 0; }
.how-section h2 { text-align: center; margin-bottom: 3rem; font-size: 1.8rem; }

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.step h3 { margin-bottom: 0.5rem; }
.step p { color: var(--text-muted); font-size: 0.95rem; }

/* Features */
.features-section { padding: 4rem 0; background: var(--bg-light); }
.features-section h2 { text-align: center; margin-bottom: 3rem; font-size: 1.8rem; }

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

.feature {
    background: var(--bg);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.feature-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.feature h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.feature p { color: var(--text-muted); font-size: 0.85rem; }

/* Supporters */
.supporters-section {
    padding: 3rem 0;
    text-align: center;
}
.supporters-section h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.supporters-desc {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}
.supporters-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.supporter-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--bg-light);
    border: 1px solid var(--primary);
    border-radius: 8px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}
.supporter-link:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

/* Footer */
footer {
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--bg-light);
}
footer a { color: var(--accent); text-decoration: none; }

/* Config inputs */
.config-input {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-light);
    border: 2px solid transparent;
    border-radius: 8px;
    color: var(--text);
    font-size: 0.85rem;
    transition: border-color 0.2s;
}
.config-input:focus {
    border-color: var(--accent);
    outline: none;
}
.config-hint {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

.color-input {
    width: 50px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    .config-options { gap: 0.4rem; }
    .config-option { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
    .theme-option { width: 35px; height: 35px; }
}
