/* === FONTS === */
@font-face {
    font-family: 'Lobster';
    src: url('../fonts/Lobster%201.4.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto';
    src: url('../fonts/Roboto-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Sunflower';
    src: url('../fonts/MADE-Sunflower.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* === KEYFRAMES === */
@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes moveAura {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(150px, 80px) scale(1.2);
    }

    66% {
        transform: translate(-80px, 150px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

@keyframes floatTitle {

    0%,
    100% {
        transform: translateY(0) rotate(-3deg);
    }

    50% {
        transform: translateY(-12px) rotate(-3deg);
    }
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === DISCORD COMPATIBILITY & POINTER-EVENTS === */
.bg-animations,
.bg-animations *,
#particles-canvas {
    pointer-events: none !important;
    z-index: -1 !important;
}

.container,
.container *,
.main-container,
.main-container *,
button,
input,
.btn-big {
    pointer-events: auto !important;
    position: relative;
}

button svg,
button path {
    pointer-events: none !important;
}

/* Container Layout */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    z-index: 1;
}

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

body {
    background: #0b0014;
    color: white;
    font-family: 'Roboto', sans-serif;
    margin: 0;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    user-select: none;
    position: relative;
}

/* === BACKGROUND === */
.bg-animations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(-45deg, #0b0014, #240036, #1e0b2e, #0b0014);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    overflow: hidden;
    pointer-events: none;
}

.aura {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    animation: moveAura 25s linear infinite;
    will-change: transform;
    contain: strict;
    pointer-events: none;
}

.aura-1 {
    width: 500px;
    height: 500px;
    background: #6c5ce7;
    top: -10%;
    left: -5%;
}

.aura-2 {
    width: 600px;
    height: 600px;
    background: #d400ff;
    bottom: -15%;
    right: -5%;
    animation-duration: 35s;
    animation-direction: reverse;
}

#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.6;
    pointer-events: none;
    z-index: -1;
}

/* === HEADER === */
.header-wrapper {
    display: inline-block;
    position: relative;
    text-align: center;
    margin-bottom: 40px;
    margin-top: 5px;
    transform: rotate(-3deg);
    z-index: 101;
    flex-shrink: 0;
}

.lobby-title {
    font-family: 'Lobster', cursive;
    font-size: clamp(3.5em, 8vw, 7em);
    color: #ffffff;
    margin: 0;
    margin-bottom: -5px;
    line-height: 1.1;
    text-shadow:
        1px 1px 0px #dff9fb,
        2px 2px 0px #a29bfe,
        3px 3px 0px #6c5ce7,
        4px 4px 0px #6c5ce7,
        5px 5px 0px #4834d4,
        6px 6px 0px #301b81,
        0 0 20px rgba(212, 0, 255, 1),
        0 0 50px rgba(108, 92, 231, 0.8),
        0 0 100px rgba(108, 92, 231, 0.5);
    animation: floatTitle 5s ease-in-out infinite;
}

.lobby-subtitle {
    font-family: 'Roboto', sans-serif;
    font-size: 0.95em;
    font-style: italic;
    font-weight: 300;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.6);
    text-align: right;
    margin-right: -8px;
    margin-top: 3px;
    display: block;
    animation: floatTitle 5s ease-in-out infinite;
}

.kr3akz-highlight {
    color: #a29bfe;
    font-weight: 900;
    font-style: italic;
    margin-left: 3px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(162, 155, 254, 0.4);
}

/* === MAIN CONTAINER === */
.main-container {
    position: relative;
    z-index: 100;
    width: 92%;
    max-width: 1000px;
    pointer-events: auto;
    animation: fadeSlideUp 0.6s ease forwards;
}

/* === NEW GRID LAYOUT === */
.profile-and-editor {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 16px;
    align-items: stretch;
}

.profile-section {
    grid-column: 1;
    grid-row: 1;
}

.editor-section {
    grid-column: 2;
    grid-row: 1;
}

.tutorial-slider {
    grid-column: 1 / -1;
    grid-row: 2;
}

/* === PANELS === */
.profile-section,
.editor-section,
.tutorial-slider {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.profile-section,
.editor-section {
    background: #1e0a32;
    /* Das hellere Panel-Design aus der Lobby */
    padding: 28px 26px;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
}

.profile-section {
    justify-content: space-between;
}

.section-title {
    font-family: 'Lobster', cursive;
    font-size: 1.4em;
    color: #e0d4ff;
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(212, 0, 255, 0.3);
}

/* === TUTORIAL SLIDER === */
.tutorial-slider {
    background: #10041f;
    /* Behält den dunkleren Hintergrund */
    padding: 22px 28px;
    color: white;
    /* Vignette / Inset-Shadow entfernt, nur der äußere Schatten bleibt */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.tutorial-slider .section-title {
    margin-bottom: 14px;
    text-align: center;
}

.slides-wrapper {
    position: relative;
    height: 110px;
    overflow: hidden;
    margin-bottom: 14px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.4s ease;
    pointer-events: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    text-align: left;
    padding: 0 12px;
}

.slide.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.slide-icon {
    font-size: 3rem;
    flex-shrink: 0;
    width: 56px;
    text-align: center;
}

.slide-text {
    flex: 1;
}

.slide h3 {
    margin: 0 0 6px 0;
    font-family: 'Lobster', cursive;
    color: #a29bfe;
    font-size: 1.25rem;
}

.slide p {
    margin: 0;
    font-size: 0.88rem;
    color: #c8d0e0;
    line-height: 1.5;
}

/* Controls */
.slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0;
}

.nav-arrow {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.nav-arrow:hover {
    color: white;
    background: rgba(162, 155, 254, 0.15);
    border-color: rgba(162, 155, 254, 0.4);
    transform: scale(1.05);
}

.nav-arrow svg {
    width: 20px;
    height: 20px;
}

/* Progress dots */
.dots-container {
    display: flex;
    gap: 8px;
}

.dot-wrapper {
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.dot-inner {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    transition: background 0.3s;
}

.dot-wrapper.active .dot-inner {
    background: white;
}

.progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
}

.progress-ring circle {
    fill: transparent;
    stroke: #a29bfe;
    stroke-width: 2;
    stroke-dasharray: 63;
    stroke-dashoffset: 63;
    stroke-linecap: round;
}

/* === EDITOR SECTION === */
.editor-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
    gap: 12px;
}

.simple-icon {
    width: 64px;
    height: 64px;
    color: #a29bfe;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.simple-icon:hover {
    transform: scale(1.1);
    color: #6c5ce7;
}

.editor-section h3 {
    font-family: 'Lobster', cursive;
    font-size: 1.6em;
    color: #a29bfe;
    margin-bottom: 8px;
    text-shadow: 0 0 10px rgba(108, 92, 231, 0.3);
}

.editor-section p {
    color: #9aa5b4;
    line-height: 1.5;
    font-size: 0.95em;
    text-align: center;
    max-width: 90%;
}

/* === INPUT === */
input[type="text"] {
    width: 100%;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: white;
    font-size: 1.1em;
    text-align: center;
    outline: none;
    transition: all 0.3s;
    box-sizing: border-box;
    pointer-events: auto;
    z-index: 10;
    position: relative;
    font-family: 'Roboto', sans-serif;
}

input[type="text"]:focus {
    border-color: #d400ff;
    background: rgba(212, 0, 255, 0.08);
    box-shadow: 0 0 20px rgba(212, 0, 255, 0.2);
}

/* === BUTTONS === */
.btn-big {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 16px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    pointer-events: auto;
    color: white;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

.btn-create {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.4);
}

.btn-create:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.6), 0 0 20px rgba(212, 0, 255, 0.3);
    filter: brightness(1.1);
}

.btn-join {
    background: linear-gradient(135deg, #00b894, #55efc4);
    box-shadow: 0 5px 15px rgba(0, 184, 148, 0.4);
}

.btn-join:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 184, 148, 0.6), 0 0 20px rgba(0, 184, 148, 0.3);
    filter: brightness(1.1);
}

.btn-purple-gradient {
    background-image: linear-gradient(135deg, #6c5ce7, #a29bfe) !important;
    background-color: transparent !important;
    color: white;
    box-shadow: 0 5px 20px rgba(108, 92, 231, 0.4);
    border: 0 !important;
    outline: none !important;
    opacity: 1;
    transition: all 0.3s ease;
}

.btn-purple-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.6);
}

.or-divider {
    font-size: 0.75em;
    color: rgba(255, 255, 255, 0.2);
    margin: 18px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Code Join Area */
.join-code-area {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px;
    box-sizing: border-box;
    pointer-events: auto;
    position: relative;
    z-index: 100;
}

.code-input {
    text-transform: uppercase !important;
    letter-spacing: 3px !important;
    font-weight: bold !important;
    margin-bottom: 10px !important;
}

/* === HELPER === */
.hidden {
    display: none !important;
}

/* === LOADING === */
.loading-screen {
    position: fixed;
    inset: 0;
    background: #0b0014;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .profile-and-editor {
        grid-template-columns: 1fr;
    }

    .profile-section {
        grid-column: 1;
        grid-row: 1;
    }

    .editor-section {
        grid-column: 1;
        grid-row: 2;
    }

    .tutorial-slider {
        grid-column: 1;
        grid-row: 3;
    }

    .main-container {
        width: 95%;
    }

    .slide {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .slides-wrapper {
        height: 160px;
    }
}

@media (max-width: 1920px) {
    body {
        zoom: 0.8;
    }

    .container {
        margin-top: 16vh;
    }
}