/* ============================================= */
/* === STYLE.CSS — Qwizzle Imposter Edition   === */
/* ============================================= */

/* === FONTS === */
@import url('https://fonts.googleapis.com/css2?family=Lobster&family=Roboto:wght@300;400;700;900&display=swap');

/* === 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); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 15px rgba(212,0,255,0.2); }
    50%       { box-shadow: 0 0 30px rgba(212,0,255,0.5); }
}

@keyframes shakeInput {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

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

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

/* === BACKGROUND === */
.bg-animations {
    position: fixed;
    inset: 0;
    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;
    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;
    inset: 0;
    width: 100%; height: 100%;
    opacity: 0.6;
    pointer-events: none;
    z-index: -1;
}

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

.lobby-title {
    font-family: 'Lobster', cursive;
    font-size: clamp(3.5em, 8vw, 6em);
    color: #fff;
    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;
}

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

/* === 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;
    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);
}

/* === AVATAR EDITOR === */
.skribbl-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.arrow-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skribbl-btn {
    background: rgba(108,92,231,0.15);
    border: 1px solid rgba(108,92,231,0.3);
    border-radius: 12px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.skribbl-btn:hover {
    background: rgba(212,0,255,0.2);
    border-color: #d400ff;
    transform: scale(1.1);
}

.skribbl-btn .arrow {
    width: 20px; height: 20px;
    fill: #a29bfe;
    display: block;
}

.avatar-preview {
    width: 120px; height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #d400ff;
    background: rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(212,0,255,0.4);
    flex-shrink: 0;
}

.avatar-preview.glow {
    box-shadow: 0 0 40px var(--glow-color, rgba(212,0,255,0.5));
    border-color: var(--glow-color, #d400ff);
}

.avatar-preview img {
    width: 100%; height: 100%;
    object-fit: cover;
}

/* === TUTORIAL SLIDER === */
.tutorial-slider {
    background: #10041f;
    padding: 22px 28px;
    color: white;
    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: 100px;
    overflow: hidden;
    margin-bottom: 14px;
}

.slide {
    position: absolute;
    inset: 0;
    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: 2.8rem; flex-shrink: 0; width: 52px; text-align: center; }
.slide-text { flex: 1; }
.slide h3 { margin: 0 0 6px 0; font-family: 'Lobster', cursive; color: #a29bfe; font-size: 1.2rem; }
.slide p  { margin: 0; font-size: 0.88rem; color: #c8d0e0; line-height: 1.5; }

.slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.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; }

.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; inset: 0; transform: rotate(-90deg); }
.progress-ring circle {
    fill: transparent;
    stroke: #a29bfe;
    stroke-width: 2;
    stroke-dasharray: 63;
    stroke-dashoffset: 63;
    stroke-linecap: round;
}

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

.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;
}

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

/* === INPUT === */
.input-group { margin-bottom: 0; width: 100%; }

.input-glass {
    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;
    font-family: 'Roboto', sans-serif;
}

.input-glass:focus {
    border-color: #d400ff;
    background: rgba(212,0,255,0.08);
    box-shadow: 0 0 20px rgba(212,0,255,0.2);
}

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

/* === BUTTONS === */
.btn-big {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 16px;
    font-size: 1.05em;
    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;
    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-ready {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* === 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; }
}