/* ===== BASE ===== */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;

    background: linear-gradient(180deg, #0f172a, #020617);
    color: #e5e7eb;
}

main {
    flex-grow: 1;
}

/* ===== RESET ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

/* ===== PRIMARY COLOR ===== */
:root {
    --primary: #0FEDF0;
    --primary-soft: rgba(15, 237, 240, 0.15);
}

/* ===== BUTTONS ===== */
.button, button {
    padding: 10px 14px;
    border-radius: 10px;
    background: #1e293b;
    border: 1px solid #334155;
    color: #e5e7eb;
    transition: all 0.25s ease;
}

.button:hover, button:hover {
    border-color: var(--primary);
    background: #0f172a;
    box-shadow: 0 0 0 2px var(--primary-soft);
}

/* ===== INPUTS ===== */
input, textarea, select {
    width: 100%;
    background: #020617;
    border: 1px solid #334155;
    color: #e5e7eb;
    padding: 8px;
    border-radius: 8px;
    margin-top: 6px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-soft);
}

/* ===== ACCORDION ===== */
.accordion {
    background: #111827;
    padding: 12px;
    width: 100%;
    border-radius: 12px;
    border: 1px solid #1f2937;
    transition: all 0.25s ease;
    position: relative;
}

.accordion:hover {
    background: #1e293b;
    border-color: var(--primary);
}

.accordion:after {
    content: '+';
    float: right;
    transition: transform 0.3s ease;
}

.accordion.active:after {
    content: '−';
}

/* ===== PANEL (SMOOTH ANIMATION) ===== */
.panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;

    transition: max-height 0.4s ease, opacity 0.3s ease;

    background: #020617;
    border-radius: 12px;
    border: 1px solid #1e293b;
    margin-top: 8px;

    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;

    padding: 0 16px;
}

.panel.panel--open {
    max-height: 1000px;
    opacity: 1;
    padding: 16px;
}

/* ===== LAYOUT ===== */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container > * {
    width: 100%;
    max-width: 1100px;
}

.row {
    display: flex;
    flex-wrap: wrap;
}

.row--body {
    align-items: flex-start;
    gap: 20px;
}

.col {
    padding: 16px;
}

/* ===== HEADER ===== */
.qr-header {
    background: rgba(17,24,39,0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #1f2937;
}

/* Header layout */
.row--qr-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Push links to right */
.row--qr-header a {
    margin-left: auto;
}

/* Fix multiple links spacing */
.row--qr-header a + a {
    margin-left: 20px;
}

/* Clean link colors */
.qr-header a {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s;
}

.qr-header a:hover {
    color: var(--primary);
}

/* LOGO FIX */
.qr-logo__img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* TITLE */
.qr-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
}

/* ===== HERO ===== */
.qr-description {
    text-align: center;
    padding: 40px 20px;
}

.qr-description__lib-name {
    font-size: 42px;
    font-weight: 700;
    color: var(--primary);
}

/* ===== FORM ===== */
.qr-form {
    flex-grow: 1;
    display: flex;
    flex-direction: column;

    background: rgba(17,24,39,0.6);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid #1f2937;
}

/* ===== QR CARD ===== */
.qr-code-container {
    position: sticky;
    top: 10px;

    background: rgba(17,24,39,0.7);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid #1f2937;

    transition: transform 0.3s ease;
}

.qr-code-container:hover {
    transform: translateY(-4px);
}

/* QR CANVAS */
.qr-code canvas {
    max-width: 300px !important;
    width: 100%;
    border-radius: 12px;
}

/* ===== DOWNLOAD ===== */
.qr-download-group {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.qr-download-group select {
    border-left: 1px solid #334155;
}

/* ===== BUTTON GROUP ===== */
.buttons-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.buttons-container button {
    margin-left: 10px;
}

.buttons-container button:first-of-type {
    margin-left: auto;
}

/* ===== SPACE BETWEEN ===== */
.space-between-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Each option */
.space-between-container > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Radio input */
input[type="radio"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}

/* Label text */
.space-between-container label {
    margin: 0;
    font-size: 14px;
    color: #cbd5f5;
}

/* ===== FOOTER ===== */
.qr-footer {
    margin-top: 40px;
    padding: 20px 0;

    text-align: center;

    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(10px);

    border-top: 1px solid #1f2937;
}

/* Footer text */
.qr-footer .col {
    font-size: 14px;
    color: #94a3b8;
}

/* Fix link (remove blue/purple) */
.qr-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    margin-left: 4px;
    transition: all 0.2s ease;
}

/* Hover effect */
.qr-footer a:hover {
    color: #67f6f8;
    text-shadow: 0 0 6px rgba(15, 237, 240, 0.4);
}

/* Remove default visited purple */
.qr-footer a:visited {
    color: var(--primary);
}

/* ===== EXPORT ===== */
.options-export-group {
    margin-top: 20px;
}

/* ===== TEXTAREA ===== */
#form-data {
    width: 100%;
}

/* ===== HIDE ===== */
.hide {
    display: none;
    height: 0;
    width: 0;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 10px;
}

/* Color input visible square */
input[type="color"] {
    appearance: none;
    -webkit-appearance: none;

    width: 50px;
    height: 36px;

    border-radius: 8px;
    border: 1px solid #334155;
    padding: 2px;

    background: transparent;
    cursor: pointer;
}

/* Remove default inner border */
input[type="color"]::-webkit-color-swatch {
    border-radius: 6px;
    border: none;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

/* Add hover effect */
input[type="color"]:hover {
    border-color: var(--primary);
}

label {
    display: block;
    margin-bottom: 4px;
}

.panel > div {
    margin-bottom: 8px;
}