/* ====================================
   JOIN WRAPPERS - CLIENT & HOST SCREENS
   ==================================== */

:root {
    --primary: #de406b;
    --primary-light: #ff5a7f;
    --primary-dark: #750423;
    --bg-dark: #0f0715;
    --text-primary: #ffffff;
    --text-secondary: #e0d5ff;
}

/* ====================================
   HOST JOIN SCREEN (join.blade.php)
   ==================================== */

.gamewrapper__online--join {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4rem;
    background: linear-gradient(135deg, #0f0715 0%, #1a1220 40%, #2d2235 100%);
    position: relative;
    overflow: hidden;
    max-width: 100vw;
}

@keyframes gradientShift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-50px, -50px); }
}

.gamewrapper__online .logo h2 {
    font-family: 'Rowdies', sans-serif;
    font-size: 4rem;
    margin-top: 0px;
    margin-left: 7.5%;
}

.gamewrapper__online .logo p {
    font-family: 'Righteous', cursive;
    font-size: 1.5rem;
    margin-top: 0px;
    margin-left: 7.5%;
}

.logo--join {
    position: relative;
    z-index: 2;
    width: auto;
    height: auto;
    transform: none;
    top: auto;
    left: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 0 0 auto;
    max-width: 400px;
}

.logo--join img {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 8px 24px rgba(222, 64, 107, 0.25));
    transition: all 0.3s ease;
}

.logo--join img:hover {
    transform: scale(1.05);
}

.logo-text--join {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.logo-text--join h2 {
    font-size: 2.5rem;
    margin: 0;
    font-weight: 800;
    font-family: 'Rowdies', sans-serif;
    color: white;
    letter-spacing: -0.5px;
}

.game-pin-text {
    font-size: 1.8rem;
    font-weight: 800;
    color: #de406b;
    margin: 0;
    font-family: 'Rowdies', sans-serif;
    letter-spacing: 1px;
}

.logo-text--join p {
    font-size: 0.95rem;
    color: #e0d5ff;
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 400;
    line-height: 1.5;
}

.join-url {
    font-weight: 700;
    color: #ff5a7f;
    font-family: 'Righteous', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.qr-code-box--join {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(222, 64, 107, 0.3);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
}

.qr-code-box--join:hover {
    transform: translateY(-4px);
    box-shadow: 0 28px 80px rgba(222, 64, 107, 0.4);
}

.qr-label--join {
    font-size: 1rem;
    font-weight: 700;
    color: #750423;
    margin: 0;
    font-family: 'Righteous', sans-serif;
    letter-spacing: 0.3px;
}

.gamewrapper__online__content--join {
    width: auto;
    z-index: 2;
}

.pin-qr-container--join {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex: 1;
}

.orb--join {
    width: 280px;
    height: 280px;
    background-color: rgba(200, 182, 182, 0.8);
    color: #6D214F;
    border-radius: 50%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 60px rgba(222, 64, 107, 0.3);
    animation: orbGlowJoin 3s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes orbGlowJoin {
    0%, 100% {
        box-shadow: 0 20px 60px rgba(222, 64, 107, 0.3);
    }
    50% {
        box-shadow: 0 30px 80px rgba(222, 64, 107, 0.5);
    }
}

.orb-text--join {
    font-size: 2.2rem;
    font-weight: 800;
    font-family: 'Rowdies', sans-serif;
    margin: 0;
    color: #6D214F;
    letter-spacing: -0.5px;
}

.gamewrapper__online--join #qrcode {
    display: flex;
    justify-content: center;
    align-items: center;
}

.gamewrapper__online--join #qrcode canvas,
.gamewrapper__online--join #qrcode img {
    border-radius: 8px;
    background: white;
    padding: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Responsive Host Join Screen */
@media (max-width: 1200px) {
    .gamewrapper__online--join {
        flex-direction: column;
        padding: 2rem;
        justify-content: center;
    }

    .pin-qr-container--join {
        flex-direction: column;
        gap: 2rem;
        width: 100%;
    }

    .logo--join {
        width: 100%;
        margin-bottom: 2rem;
    }

    .logo-text--join h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .gamewrapper__online--join {
        padding: 1.5rem;
    }

    .logo-text--join h2 {
        font-size: 1.6rem;
    }

    .game-pin-text {
        font-size: 1.4rem;
    }

    .orb--join {
        width: 220px;
        height: 220px;
    }

    .orb-text--join {
        font-size: 1.8rem;
    }

    .qr-code-box--join {
        padding: 1.5rem;
    }

    .gamewrapper__online--join #qrcode canvas,
    .gamewrapper__online--join #qrcode img {
        width: 200px !important;
        height: 200px !important;
    }

    .pin-qr-container--join {
        gap: 1.5rem;
    }
}

.heartbeat {
    -webkit-animation: heartbeat 5s ease-in-out infinite both;
    animation: heartbeat 5s ease-in-out infinite both;
}

@-webkit-keyframes heartbeat {
    from {
        -webkit-transform: scale(1);
        transform: scale(1);
        -webkit-transform-origin: center center;
        transform-origin: center center;
        -webkit-animation-timing-function: ease-out;
        animation-timing-function: ease-out;
    }
    10% {
        -webkit-transform: scale(0.91);
        transform: scale(0.91);
        -webkit-animation-timing-function: ease-in;
        animation-timing-function: ease-in;
    }
    17% {
        -webkit-transform: scale(0.98);
        transform: scale(0.98);
        -webkit-animation-timing-function: ease-out;
        animation-timing-function: ease-out;
    }
    33% {
        -webkit-transform: scale(0.87);
        transform: scale(0.87);
        -webkit-animation-timing-function: ease-in;
        animation-timing-function: ease-in;
    }
    45% {
        -webkit-transform: scale(1);
        transform: scale(1);
        -webkit-animation-timing-function: ease-out;
        animation-timing-function: ease-out;
    }
}

@keyframes heartbeat {
    from {
        -webkit-transform: scale(1);
        transform: scale(1);
        -webkit-transform-origin: center center;
        transform-origin: center center;
        -webkit-animation-timing-function: ease-out;
        animation-timing-function: ease-out;
    }
    10% {
        -webkit-transform: scale(0.91);
        transform: scale(0.91);
        -webkit-animation-timing-function: ease-in;
        animation-timing-function: ease-in;
    }
    17% {
        -webkit-transform: scale(0.98);
        transform: scale(0.98);
        -webkit-animation-timing-function: ease-out;
        animation-timing-function: ease-out;
    }
    33% {
        -webkit-transform: scale(0.87);
        transform: scale(0.87);
        -webkit-animation-timing-function: ease-in;
        animation-timing-function: ease-in;
    }
    45% {
        -webkit-transform: scale(1);
        transform: scale(1);
        -webkit-animation-timing-function: ease-out;
        animation-timing-function: ease-out;
    }
}

/* ====================================
   PLAYER CARDS - MODERN REDESIGN
   ==================================== */

.joining__player {
    width: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: playerSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes playerSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.joined__player__icon {
    width: 160px;
    height: 160px;
    border: 3px solid #de406b;
    background: url("../css/img/characters/DrunkSteve.png");
    background-position: center;
    background-size: cover;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 8px 24px rgba(222, 64, 107, 0.25);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.joining__player:hover .joined__player__icon {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(222, 64, 107, 0.35);
}

.joined__player__icon::after {
    content: "";
    position: absolute;
    inset: -8px;
    background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: readyPulse 2s ease-in-out infinite;
}

.ready .joined__player__icon::after {
    opacity: 1;
}

@keyframes readyPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
}

.joined__player__kick {
    display: flex;
    width: 2.5rem;
    height: 2.5rem;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #de406b 0%, #ff5a7f 100%);
    border: none;
    border-radius: 50%;
    z-index: 10;
    position: absolute;
    top: -0.75rem;
    right: -0.75rem;
    font-family: 'Righteous', sans-serif;
    font-size: 1.4rem;
    color: white;
    font-weight: 800;
    user-select: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(222, 64, 107, 0.35);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.joined__player__kick:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(222, 64, 107, 0.5);
    background: linear-gradient(135deg, #ff5a7f 0%, #de406b 100%);
}

.joined__player__kick:active {
    transform: scale(0.95);
}

.joined__player__name {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.6) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(222, 64, 107, 0.4);
    margin-top: -20px;
    text-align: center;
    width: 160px;
    border-radius: 20px 20px 20px 20px;
    padding: 0.75rem 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 5;
}

.joining__player:hover .joined__player__name {
    border-color: rgba(222, 64, 107, 0.8);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 100%);
}

.ready .joined__player__name {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(16, 185, 129, 0.1) 100%);
    border-color: rgba(16, 185, 129, 0.6);
}

.joined__player__name h2 {
    padding: 0;
    margin: 0;
    font-family: 'Righteous', sans-serif;
    font-size: 0.9rem;
    color: white;
    word-break: break-word;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.ready .joined__player__name h2 {
    color: #10b981;
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

/* ====================================
   ORB - UPDATED TO MATCH PLAYERS
   ==================================== */

.orb {
    width: 280px;
    height: 280px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
    color: #6D214F;
    border-radius: 50%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(222, 64, 107, 0.2);
    box-shadow: 0 20px 60px rgba(222, 64, 107, 0.25);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.orb:not(.heartbeat) {
    opacity: 0.7;
}

.orb.heartbeat {
    cursor: pointer;
    animation: orbPulse 2s ease-in-out infinite;
}

@keyframes orbPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 20px 60px rgba(222, 64, 107, 0.25);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 30px 80px rgba(222, 64, 107, 0.4);
    }
}

.orb h2 {
    max-width: 85%;
    margin: 0;
    padding: 0;
    font-size: 2.2rem;
    text-align: center;
    font-family: 'Rowdies', sans-serif;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #de406b 0%, #750423 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ====================================
   RESPONSIVE PLAYER CARDS & ORB
   ==================================== */

@media (max-width: 1024px) {
    .joining__player {
        width: 140px;
    }

    .joined__player__icon {
        width: 140px;
        height: 140px;
        border-width: 2.5px;
    }

    .joined__player__name {
        width: 140px;
    }

    .joined__player__name h2 {
        font-size: 0.8rem;
    }

    .orb {
        width: 240px;
        height: 240px;
    }

    .orb h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .joining__player {
        width: 120px;
    }

    .joined__player__icon {
        width: 120px;
        height: 120px;
        border-width: 2px;
        box-shadow: 0 6px 16px rgba(222, 64, 107, 0.2);
    }

    .joined__player__kick {
        width: 2.2rem;
        height: 2.2rem;
        font-size: 1.2rem;
        box-shadow: 0 3px 8px rgba(222, 64, 107, 0.3);
    }

    .joined__player__name {
        width: 120px;
        margin-top: -18px;
    }

    .joined__player__name h2 {
        font-size: 0.75rem;
    }

    .orb {
        width: 200px;
        height: 200px;
    }

    .orb h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .joining__player {
        width: 100px;
    }

    .joined__player__icon {
        width: 100px;
        height: 100px;
        border-width: 2px;
    }

    .joined__player__kick {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }

    .joined__player__name {
        width: 100px;
        margin-top: -16px;
        padding: 0.5rem 0.25rem;
    }

    .joined__player__name h2 {
        font-size: 0.65rem;
    }

    .orb {
        width: 160px;
        height: 160px;
    }

    .orb h2 {
        font-size: 1.2rem;
    }
}

/**changes below only effect the join wrapper**/

.join__wrapper {
    display: flex;
    flex-direction: column;
    position: relative;
    background: linear-gradient(135deg, #0f0715 0%, #1a1220 40%, #2d2235 100%);
    width: 100%;
    height: 100vh;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.join__wrapper .pq-ticker {
    position: absolute !important;
    bottom: 0px;
}

.join__wrapper::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(222, 64, 107, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(109, 40, 217, 0.1) 0%, transparent 50%);
    animation: joinGradientShift 15s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes joinGradientShift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-50px, -50px); }
}

.join__wrapper .input__box {
    position: relative;
    z-index: 2;
    display: flex;
    width: 90%;
    max-width: 600px;
    margin-bottom: 80px;
    background: linear-gradient(135deg, rgba(222, 64, 107, 0.15) 0%, rgba(109, 40, 217, 0.05) 100%);
    border: 1.5px solid rgba(222, 64, 107, 0.35);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 12px 48px rgba(222, 64, 107, 0.15);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 3em 0em;
}

.join__wrapper .input__box:hover {
    border-color: rgba(222, 64, 107, 0.6);
    box-shadow: 0 16px 60px rgba(222, 64, 107, 0.25);
}

.join__wrapper .input__box img {
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 8px 24px rgba(222, 64, 107, 0.25));
}

.join__wrapper .input__box h2 {
    color: white;
    font-size: 2rem;
    font-family: 'Rowdies', sans-serif;
    margin: 0 0 1.5rem 0;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.join__wrapper .input__box input {
    -moz-appearance: textfield;
    -webkit-appearance: textfield;
    appearance: textfield;
    margin: 0;
    text-align: center;
    border-radius: 12px;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-family: 'Righteous', sans-serif;
    border: 2px solid rgba(222, 64, 107, 0.35);
    padding: 1rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    letter-spacing: 2px;
    font-weight: 600;
}

.join__wrapper .input__box input:focus,
.join__wrapper .input__box input:hover {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(222, 64, 107, 0.3);
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.join__wrapper .input__box button {
    margin-top: 2rem;
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 1rem 2.5rem;
    color: white;
    border: none;
    border-radius: 12px;
    font-family: 'Righteous', sans-serif;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(222, 64, 107, 0.3);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.join__wrapper .input__box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(222, 64, 107, 0.4);
}

.join__wrapper .input__box button:hover::before {
    left: 100%;
}

.join__wrapper .input__box button:active {
    transform: translateY(0);
}

.join__wrapper .input__box label {
    color: white;
    font-size: 1.2rem;
    font-family: 'Rowdies', sans-serif;
    font-weight: 700;
}

/* Responsive Client Join Screen */
@media (max-width: 768px) {
    .join__wrapper .input__box {
        width: 95%;
        margin-bottom: unset;
        border-radius: 20px 20px 0px 0px;
    }

    .join__wrapper .input__box h2 {
        font-size: 1.6rem;
    }

    .join__wrapper .input__box input {
        font-size: 1.2rem;
        max-width: 85%;
    }

    .join__wrapper .input__box button {
        font-size: 1rem;
        padding: 0.9rem 2rem;
    }
}

@media (max-width: 480px) {
    .join__wrapper .input__box {
        width: 100%;
    }

    .join__wrapper .input__box h2 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    .join__wrapper .input__box input {
        font-size: 1.1rem;
        max-width: 90%;
    }

    .join__wrapper .input__box button {
        margin-top: 1.5rem;
        font-size: 0.95rem;
    }
}

.join__wrapper {
    display: flex;
    background: linear-gradient(135deg, #0f0715 0%, #1a1220 40%, #2d2235 100%);
    width: 100%;
    height: 100vh;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.join__wrapper {
    color: white;
    font-family: 'Righteous', cursive;
}

.join__wrapper h1 {
    font-family: 'Rowdies', sans-serif;
    margin-bottom: 0px;
}

.join__wrapper p {
    color: #de406b;
}

.join__wrapper .input__logo img {
    width: 200px;
    max-width: 80vw;
    height: auto;
}

.join__wrapper .input__content {
    text-align: left;
    display: flex;
    flex-direction: column;
}

.input__wrapper--content {
    display: flex;
    flex-direction: column;
    width: 90%;
}
