:root {
    --bg-dark: #1C1C1C;
    --bg-nav: #1C1C1C;
    --bg-light: #242424;
    --text-white: #AEB2B2;
    --text-dark: #1C1C1C;
    --text-muted: #97a6af;
    --accent-blue: #6F8FF0;
    --dark-blue: #002cb1;
    --accent-red: #FE5658;
    --accent-green: #1E5128;
    --accent-orange: #413C26;
    --accent-yellow: #FDE87B;
    --cool-blue: #6f8ff078;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-blur: 10px;

    /* z-index level */
    --level--1: -1;
    --level-0: 1;
    --level-1: 10;
    --level-2: 20;
    --level-3: 30;
    --level-4: 40;
    --level-5: 50;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: 'Inter', 'Segoe UI', sans-serif;
    width: 100%;
}

/* Navigation Style EDO */
.main-nav {
    width: 100%;
    background: var(--bg-nav);
    border-bottom: 1px solid var(--accent-blue);
    position: sticky;
    top: 0;
    z-index: var(--level-4);
}

.nav-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 10px;
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text-white);
    padding: 12px 24px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
}

.nav-btn:hover {
    color: var(--accent-blue);
}

.nav-btn.active {
    color: var(--accent-blue);
    border-bottom: 2px solid var(--accent-blue);
}

/* --- Global Harmonized UI Components --- */

/* 1. Standardized Buttons */
button,
.nav-btn,
.tab-btn {
    padding: 10px 20px;
    background: var(--glass);
    border: 1px solid var(--glass);
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 10px;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(.2, .9, .32, 1);
    backdrop-filter: blur(var(--glass-blur));
    font-family: 'Inter', sans-serif;
}

button:hover,
.nav-btn:hover {
    transform: translateY(-2px);
    color: var(--text-white);
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.05);
}

button.active,
.nav-btn.active,
.tab-btn.active {
    background: linear-gradient(90deg, var(--accent-blue), rgba(111, 143, 240, 0.2));
    border: 1px solid rgba(111, 143, 240, 0.4);
    color: var(--text-dark);
    /* Improved contrast for active state */
}

/* 2. Harmonized Form Inputs (Select, Number, Text) */
select,
input[type="number"],
input[type="text"] {
    background-color: var(--bg-light);
    color: var(--text-white);
    border: 1px solid var(--glass);
    border-radius: 8px;
    padding: 8px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9em;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
}

select:focus,
input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(111, 143, 240, 0.2);
}

/* 3. Custom Styled Checkboxes */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--bg-light);
    border: 2px solid var(--accent-blue);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    margin-right: 8px;
}

input[type="checkbox"]:checked {
    background: var(--accent-blue);
}

input[type="checkbox"]:checked::after {
    position: absolute;
    color: var(--text-dark);
    font-size: 14px;
    font-weight: bold;
    left: 2px;
    top: -2px;
}

/* 4. Table Harmonization */
table {
    border-collapse: separate;
    border-spacing: 4px;
}

td,
th {
    border-radius: 6px;
}

.card {
    background: var(--glass);
    border: 1px solid var(--glass);
    border-radius: 14px;
    padding: 20px;
    backdrop-filter: blur(var(--glass-blur));
    transition: transform 260ms cubic-bezier(.2, .9, .32, 1), box-shadow 260ms;
    box-shadow: 0 6px 30px var(--bg-nav);
}

/* headings inside cards */
.card h3 {
    font-size: 1.28em;
    margin-bottom: 12px;
    color: var(--text-white);
}

.card h4 {
    font-size: 1.03em;
    margin-top: 12px;
    margin-bottom: 8px;
    color: var(--accent-blue);
}

/* Foldable Footer Styling */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: var(--level-5);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

footer.folded {
    transform: translateY(calc(100% - 30px));
    /* Leaves only the arrow visible */
}

.footer-toggle {
    width: 50px;
    height: 30px;
    background: var(--bg-light);
    border: 1px solid var(--glass);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-white);
    transition: background 0.3s;
}

.footer-toggle:hover {
    background: var(--bg-dark);
}

.footer-toggle i {
    transition: transform 0.3s;
}

footer.folded .footer-toggle i {
    transform: rotate(180deg);
}

/* Adjusting existing footer containers */
footer .card {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    margin-bottom: 0;
}

#infos {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 40px;
    height: 50px;
    background: var(--bg-light);
    border: 3px solid var(--glass);
    border-right: none;
    border-radius: 15px 0 0 15px;
    color: var(--text-white);
    font-size: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    transition: all 0.3s ease;
    z-index: var(--level-5);
    box-shadow: -2px 2px 10px rgba(0,0,0,0.2);
}

#infos:hover {
    color: var(--text-white);
    transform: translateY(-50%) scale(1.1) translateX(-5px);
    cursor: pointer;
}

#infos:hover~#main {
    visibility: visible;
    opacity: 1;
}

#main:hover {
    visibility: visible;
    opacity: 1;
}

#main {
    position: fixed;
    top: 10%;
    left: 5%;
    /* Use a semi-transparent glass border as the base */
    border: 2px solid var(--glass);
    border-radius: 20px;
    visibility: hidden;
    opacity: 0;
    background-color: var(--bg-light);
    color: var(--text-white);
    width: 90%;
    transition: all 0.3s ease;
    z-index: var(--level-3);
    text-align: justify;
    font-size: 0.7em;
    backdrop-filter: blur(var(--glass-blur));
    overflow: hidden;
    max-height: 80vh;
    padding: 10px;
    box-sizing: border-box;
    z-index: var(--level-5);
}

/* The "Running" Accent Line */
#main::before {
    content: "";
    position: absolute;
    /* Expand slightly outside the container to cover the border area */
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    border-radius: 200%;
    background: var(--accent-blue);
    opacity: 0.5;
    animation: rotateLine 8s ease-in-out infinite;
    z-index: var(--level--1);
}

#main::after {
    content: "";
    position: absolute;
    inset: 2px;
    /* This thickness should match your desired border width */
    background: var(--bg-light);
    border-radius: 18px;
    /* Slightly less than parent to fit inside */
    z-index: var(--level--1);
}

@keyframes rotateLine {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

#main p {
    margin: 0;
    padding: 10px 20px;
    font-size: 1.5em;
}

#main h1 {
    padding: 10px 20px;
}

a {
    text-decoration: none;
    color: var(--accent-blue);
    font-weight: bold;
    transition: all 0.3s ease;
}

.card canvas,
.card svg,
.card custom-keyboard,
.card guitar-fretboard {
    max-width: 100%;
    /* height: auto !important; */
}

@media (max-width: 600px) {
}