/* ==================== PALETAR.RO - MAIN STYLESHEET ==================== */
/* A site about colors should LOOK like a celebration of color */

:root {
    --bg: #0a0a1a;
    --bg-elevated: #12122a;
    --bg-surface: #1a1a35;
    --border: rgba(255,255,255,0.08);
    --border-hover: rgba(255,255,255,0.15);
    --text: #e0e0e0;
    --text-dim: rgba(255,255,255,0.4);
    --text-muted: rgba(255,255,255,0.6);
    --primary: #ff0080;
    --secondary: #7928ca;
    --accent: #0070f3;
    --success: #22c55e;
    --warning: #eab308;
    --error: #ef4444;
    --radius: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --shadow: 0 8px 30px rgba(0,0,0,0.3);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.4);
    --font: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --nav-height: 60px;
}

[data-theme="light"] {
    --bg: #f5f5f8;
    --bg-elevated: #ffffff;
    --bg-surface: #eeeef2;
    --border: rgba(0,0,0,0.08);
    --border-hover: rgba(0,0,0,0.15);
    --text: #1a1a2e;
    --text-dim: rgba(0,0,0,0.4);
    --text-muted: rgba(0,0,0,0.6);
    --shadow: 0 8px 30px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.12);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--secondary); }

img { max-width: 100%; display: block; }

code, pre { font-family: var(--font-mono); }

::selection { background: var(--primary); color: #fff; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* ===== AMBIENT ORBS ===== */
.orbs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.orb {
    position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4;
}
.orb-1 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, var(--primary), transparent 70%);
    top: -100px; left: -100px;
    animation: orbMove1 15s ease-in-out infinite;
}
.orb-2 {
    width: 350px; height: 350px;
    background: radial-gradient(circle, var(--secondary), transparent 70%);
    bottom: -80px; right: -80px;
    animation: orbMove2 18s ease-in-out infinite;
}
.orb-3 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, var(--accent), transparent 70%);
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    animation: orbMove3 20s ease-in-out infinite;
}
[data-theme="light"] .orbs { opacity: 0.3; }

@keyframes orbMove1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(100px,80px); } }
@keyframes orbMove2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-80px,-100px); } }
@keyframes orbMove3 { 0%,100% { transform: translate(-50%,-50%) scale(1); } 50% { transform: translate(-30%,-60%) scale(1.2); } }

/* ===== NAVIGATION ===== */
.main-nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(10,10,26,0.85);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    height: var(--nav-height);
}
[data-theme="light"] .main-nav { background: rgba(245,245,248,0.9); }

.nav-inner {
    max-width: 1400px; margin: 0 auto; padding: 0 20px;
    display: flex; align-items: center; justify-content: space-between;
    height: 100%;
}

.nav-logo {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: var(--text);
}
.logo-box, .logo-box-sm {
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
}
.logo-box { width: 34px; height: 34px; }
.logo-box-sm { width: 28px; height: 28px; }
.logo-text { font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.logo-dim { opacity: 0.3; font-weight: 400; }

.nav-links {
    display: flex; align-items: center; gap: 2px;
}
.nav-link {
    background: transparent; border: none; border-radius: 8px;
    padding: 6px 12px; color: var(--text-muted); cursor: pointer;
    font-family: var(--font); font-size: 13px; font-weight: 400;
    transition: all 0.2s; text-decoration: none; white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: rgba(255,255,255,0.08); }
.nav-link.active { font-weight: 700; }
[data-theme="light"] .nav-link:hover, [data-theme="light"] .nav-link.active { background: rgba(0,0,0,0.06); }

.nav-admin-link { color: var(--primary) !important; font-weight: 600 !important; }

/* Nav dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger { cursor: pointer; }
.nav-dropdown-menu {
    display: none; position: absolute; top: 100%; right: 0;
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 8px; min-width: 200px;
    box-shadow: var(--shadow-lg); z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
    display: block; padding: 8px 14px; border-radius: 8px;
    color: var(--text-muted); font-size: 13px; transition: all 0.2s;
}
.nav-dropdown-menu a:hover { background: rgba(255,255,255,0.06); color: var(--text); }

/* Language switcher */
.nav-lang { display: flex; gap: 4px; margin-left: 12px; }
.lang-btn {
    padding: 4px 8px; border-radius: 6px; font-size: 11px; font-weight: 400;
    color: var(--text-muted); background: transparent;
    border: 1px solid var(--border); text-decoration: none;
    transition: all 0.2s; text-transform: uppercase;
}
.lang-btn:hover, .lang-btn.active {
    background: rgba(255,255,255,0.1); color: var(--text); font-weight: 700;
}

/* Theme toggle */
.theme-toggle {
    background: transparent; border: 1px solid var(--border);
    border-radius: 8px; width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text); font-size: 16px;
    transition: all 0.2s; margin-left: 8px;
}
.theme-toggle:hover { background: rgba(255,255,255,0.08); }

/* Hamburger */
.nav-hamburger {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-hamburger span {
    display: block; width: 22px; height: 2px;
    background: var(--text); border-radius: 2px; transition: all 0.3s;
}

@media (max-width: 1024px) {
    .nav-hamburger { display: flex; }
    .nav-links {
        display: none; flex-direction: column; position: absolute;
        top: var(--nav-height); left: 0; right: 0;
        background: var(--bg-elevated); padding: 20px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        align-items: stretch;
    }
    .nav-links.open { display: flex; }
    .nav-link { padding: 12px 16px; text-align: left; }
    .nav-lang { margin: 12px 0 0; justify-content: center; }
    .nav-dropdown-menu { position: static; box-shadow: none; border: none; }
    .nav-dropdown:hover .nav-dropdown-menu { display: block; }
}

/* ===== MAIN CONTENT ===== */
.main-content {
    position: relative; z-index: 1;
    min-height: calc(100vh - var(--nav-height) - 80px);
}

/* ===== SECTION LAYOUTS ===== */
.page-section {
    max-width: 1200px; margin: 0 auto; padding: 40px 20px;
}
.page-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 800; text-align: center;
    margin-bottom: 30px; letter-spacing: -0.02em;
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover { border-color: var(--border-hover); }
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border-radius: var(--radius); border: none;
    font-family: var(--font); font-size: 14px; font-weight: 700;
    cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff; box-shadow: 0 4px 15px rgba(255,0,128,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(255,0,128,0.4); color: #fff; }
.btn-secondary {
    background: rgba(255,255,255,0.08); color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: rgba(255,255,255,0.12); color: var(--text); }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 8px; }
.btn-success { background: var(--success); color: #fff; }
.btn-error { background: var(--error); color: #fff; }
.btn-block { width: 100%; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 18px; }
.form-label {
    display: block; font-weight: 600; font-size: 13px;
    margin-bottom: 6px; color: var(--text-muted);
}
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 10px 14px; border-radius: var(--radius);
    border: 1px solid var(--border); background: rgba(255,255,255,0.04);
    color: var(--text); font-family: var(--font-mono); font-size: 14px;
    transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none; border-color: var(--primary);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-color {
    width: 50px; height: 40px; border: none; border-radius: 8px;
    cursor: pointer; background: transparent; padding: 0;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* ===== SLIDER ===== */
input[type="range"] {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 6px; border-radius: 3px;
    background: rgba(255,255,255,0.12); outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 20px; height: 20px; border-radius: 50%;
    background: #fff; cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
[data-theme="light"] input[type="range"] { background: rgba(0,0,0,0.12); }

/* ===== COLOR SWATCH ===== */
.color-swatch {
    border-radius: var(--radius); transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono); font-weight: 600; position: relative;
}
.color-swatch:hover { transform: scale(1.05); z-index: 10; }

/* ===== COPY BUTTON ===== */
.copy-btn {
    background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px; padding: 4px 10px; cursor: pointer;
    color: inherit; font-size: 12px; font-family: var(--font);
    transition: all 0.2s;
}
.copy-btn:hover { background: rgba(255,255,255,0.25); }
.copy-btn.copied { background: var(--success); color: #fff; }

/* ===== SPECTRUM STRIP ===== */
.spectrum-strip {
    display: flex; border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow); height: 60px;
}
.spectrum-strip > div {
    flex: 1; transition: flex 0.3s;
}
.spectrum-strip > div:hover { flex: 3; }

/* ===== WCAG BADGE ===== */
.wcag-badge {
    padding: 12px 20px; border-radius: var(--radius);
    text-align: center; font-weight: 700;
}
.wcag-pass { background: rgba(34,197,94,0.12); border: 2px solid var(--success); }
.wcag-fail { background: rgba(239,68,68,0.12); border: 2px solid var(--error); }

/* ===== TOAST NOTIFICATION ===== */
.toast {
    position: fixed; bottom: 20px; right: 20px;
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px 20px;
    box-shadow: var(--shadow-lg); z-index: 9999;
    font-weight: 600; font-size: 14px;
    animation: toastIn 0.3s ease;
    display: flex; align-items: center; gap: 8px;
}
.toast-success { border-color: var(--success); }
.toast-error { border-color: var(--error); }
@keyframes toastIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ===== FOOTER ===== */
.main-footer {
    border-top: 1px solid var(--border);
    padding: 24px 20px; position: relative; z-index: 1;
}
.footer-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 12px;
}
.footer-brand { font-size: 13px; color: var(--text-dim); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-dim); font-size: 13px; }
.footer-links a:hover { color: var(--text); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .page-section { padding: 24px 16px; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; text-align: center; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.4s ease; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
.pulse { animation: pulse 2s ease-in-out infinite; }
