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

html,
body {
    height: 100%;
    width: 100%;
    font-family: Arial, sans-serif;
    color: #000000 !important;
    color-scheme: dark;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.background-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url(../image/background.png);
    background-color: #0d0d12;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    pointer-events: none;
}

body::-webkit-scrollbar,
.main-content::-webkit-scrollbar {
    display: none;
}

header {
    width: 100%;
    height: 60px;
    z-index: 5;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    background: rgba(80, 80, 80, 0.2);
}

header h2 {
    color: #fff;
    margin: 0;
    font-size: 22px;
    font-weight: bold;
}

.menu-btn {
    width: 35px;
    height: 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 5;
}

.menu-btn span {
    display: block;
    height: 4px;
    background: #7c2bce;
    transition: 0.2s;
}

.menu-btn.open span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
    background: #9b48ee;
}

.menu-btn.open span:nth-child(2) {
    opacity: 0;
    visibility: hidden;
    transition-delay: 0.03s;
}

.menu-btn.open span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
    background: #9b48ee;
}

.menu {
    padding-top: 80px;
    height: 100%;
    width: 100%;
    z-index: 4;
    transition: 0.4s;
    position: fixed;
    top: 0;
    left: 0;
    opacity: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    pointer-events: none;
    padding-left: 20px;
    gap: 20px;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    align-content: center;
}

/* basse perf */
.menu.lowperf {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.menu.open {
    opacity: 1;
    pointer-events: auto;
}

.menu a {
    font-size: 28px;
    text-decoration: underline;
    text-decoration-color: #7c2bce;
    color: #fff;
    text-align: center;
    transition: 0.3s;
}

.menu a:hover {
    transform: translateY(-3px);
}

.main-content {
    flex: 1;
    padding-top: 60px;
    padding-bottom: 20px;
}

.classic-container {
    max-width: 1600px;
    margin: 20px;
    padding: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    background: rgba(80, 80, 80, 0.2);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.classic-block {
    background: rgba(30, 30, 30, 0.4);
    padding: 20px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: 0.3s;
}

.classic-block:hover {
    transform: translateY(-3px);
    box-shadow: 0px 7px 10px rgba(0, 0, 0, 0.4);
}

.classic-container p {
    margin: 0;
    font-size: 18px;
    color: #fff;
}

.classic-container h1 {
    margin: 0;
    font-weight: bold;
    font-size: 28px;
    color: #fff;
}

.classic-container h3 {
    margin: 0;
    font-size: 20px;
    color: #fff;
}

.btn {
    padding: 8px 18px;
    width: auto;
    height: auto;
    background: rgba(90, 90, 90, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 50px;
    border: 2px solid rgba(150, 150, 150, 0.2);
    transition: 0.3s;
    cursor: pointer;
    font-size: 16px;
    color: #fff;
    text-decoration: none;
    text-align: center;
}

.btn:hover {
    border: 2px solid #7c2bce;
    transform: translateY(-3px);
    box-shadow: 0px 7px 10px rgba(0, 0, 0, 0.4);
}

/* =========================================
           AJOUTS SPECIFIQUES AU PREVIEWER
           ========================================= */
.code-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#render-zone {
    width: 100%;
    min-height: 350px;
    border-radius: 8px;
    padding: 10px;
    color: #000;
}

pre[class*="language-"] {
    margin: 0 !important;
    border-radius: 8px !important;
    background: rgba(10, 10, 10, 0.6) !important;
    max-height: 600px;
    font-size: 0.85em;
}

.hidden {
    display: none !important;
}