/* MeetAt.io - Main Stylesheet */

/* ============================================================================
   Reset and Base Styles
   ============================================================================ */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-family: Arial, sans-serif;
    background-image: url('../img/booth_desktop.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #fff;
    padding-top: 60px;
}

/* Mobile background */
@media (max-width: 768px) {
    body {
        background-image: url('../img/booth_mobile.webp');
    }
}

/* ============================================================================
   Typography
   ============================================================================ */

h1 {
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

ul {
    text-align: left;
    margin-bottom: 30px;
    padding-left: 20px;
}

li {
    margin-bottom: 10px;
    font-size: 1rem;
}

/* ============================================================================
   Container and Layout
   ============================================================================ */

.container {
    background: rgba(0, 0, 0, 0.7);
    padding: 40px;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.subtitle {
    margin-top: 0;
    margin-bottom: 25px;
    color: #ddd;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    font-size: 1.2rem;
    max-width: 600px;
    font-weight: normal;
    text-align: center;
}

.subtitle .highlight {
    display: block;
    margin-top: 10px;
    font-size: 1rem;
    opacity: 0.9;
    color: #ccc;
}

/* Booth list layout */
.booth-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 40px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 40px;
    width: 100%;
    max-width: 800px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 255, 255, 0.5) rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.booth-list::-webkit-scrollbar {
    width: 8px;
}

.booth-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.booth-list::-webkit-scrollbar-thumb {
    background-color: rgba(0, 255, 255, 0.5);
    border-radius: 4px;
}

/* ============================================================================
   Navigation
   ============================================================================ */

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 40px;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 1000;
}

.nav-logo {
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-decoration: none;
    background: none;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    text-shadow: none;
    transition: opacity 0.2s;
}

.nav-logo:hover {
    opacity: 0.8;
    transform: none;
    box-shadow: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    background: none;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    text-shadow: none;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #fff;
    transform: none;
    box-shadow: none;
    text-decoration: underline;
}

.nav-sep {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.85rem;
    user-select: none;
}

/* ============================================================================
   Buttons and Links
   ============================================================================ */

a {
    font-size: 18px;
    color: #fff;
    text-decoration: none;
    background: rgba(0, 255, 255, 0.85);
    padding: 15px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.4), 0 0 20px rgba(0, 255, 255, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    display: inline-block;
}

a:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 255, 255, 0.6), 0 0 30px rgba(0, 255, 255, 0.5);
    text-decoration: none;
}

a:active {
    transform: scale(0.98);
}

/* Primary button styles */
.btn-primary {
    font-size: 18px;
    color: #fff;
    text-decoration: none;
    background: rgba(0, 255, 255, 0.85);
    padding: 15px 30px;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.4), 0 0 20px rgba(0, 255, 255, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    display: inline-block;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 255, 255, 0.6), 0 0 30px rgba(0, 255, 255, 0.5);
    text-decoration: none;
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Secondary button (dark) */
.btn-secondary {
    background: rgba(0, 0, 0, 0.6);
}

/* Booth list link styles */
.booth-link {
    font-size: 18px;
    color: #fff;
    text-decoration: none;
    padding: 15px 20px;
    transition: all 0.3s ease;
    text-align: center;
    background: rgba(0, 255, 255, 0.2);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.booth-link:hover {
    background: rgba(0, 255, 255, 0.85);
    border-color: rgba(0, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.4);
    color: #fff;
}

.booth-link:active {
    transform: translateY(0);
}

.booth-link img {
    flex-shrink: 0;
    filter: brightness(1.2);
}

/* Button styles */
button {
    padding: 20px 40px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;
    background: rgba(0, 255, 255, 0.85);
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.4), 0 0 20px rgba(0, 255, 255, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 255, 255, 0.6), 0 0 30px rgba(0, 255, 255, 0.5);
}

button:active {
    transform: scale(0.98);
}

#action-btn {
    flex-direction: row;
    min-height: 60px;
}

#action-btn img {
    flex-shrink: 0;
}

#action-btn span {
    display: inline;
    line-height: 1.2;
    white-space: nowrap;
}

/* ============================================================================
   Video
   ============================================================================ */

.video-container {
    position: relative;
    margin-bottom: 20px;
    display: none;
    max-width: 90vw;
    max-height: 70vh;
}

.video-container.active {
    display: block;
}

#remoteVideo {
    width: 640px;
    max-width: 90vw;
    height: auto;
    aspect-ratio: 4/3;
    background: #000;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

#localVideo {
    width: 640px;
    max-width: 90vw;
    height: auto;
    aspect-ratio: 4/3;
    background: #222;
    border-radius: 8px;
    transform: scaleX(-1);
    /* Mirror the local video */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

#localVideo.small {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 120px;
    max-width: 25%;
    height: auto;
    border: 2px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.video-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 100;
}

.video-control-btn {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    border: none;
    background: rgba(80, 80, 80, 0.8);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #fff;
    box-shadow: none;
    text-shadow: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.video-control-btn img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.video-control-btn:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: scale(1.1);
}

.video-control-btn:active {
    transform: scale(0.95);
}

.video-control-btn.active {
    background: rgba(217, 48, 37, 0.6);
    color: #fff;
}

#video-btn.active {
    background: rgba(200, 200, 200, 0.8);
}

/* ============================================================================
   Animations
   ============================================================================ */

@keyframes ringing {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(0, 255, 255, 0.4), 0 0 20px rgba(0, 255, 255, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 25px rgba(0, 255, 255, 0.8), 0 0 40px rgba(0, 255, 255, 0.7);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(0, 255, 255, 0.4), 0 0 20px rgba(0, 255, 255, 0.3);
    }
}

#action-btn.ringing {
    animation: ringing 0.8s infinite;
}

/* ============================================================================
   Page-Specific Styles
   ============================================================================ */

.booth-title {
    margin-top: 0;
    margin-bottom: 30px;
    text-align: center;
    font-weight: bold;
    position: relative;
    z-index: 10;
}

/* ============================================================================
   Mobile Responsive
   ============================================================================ */

@media (max-width: 768px) {
    .top-nav {
        padding: 10px 20px;
    }

    .nav-links a {
        font-size: 0.75rem;
    }

    h1 {
        font-size: 1.5rem;
        text-align: center;
        padding: 0 20px;
    }

    .subtitle {
        font-size: 1.1rem;
        margin-bottom: 20px;
        padding: 0 15px;
    }

    .subtitle .highlight {
        font-size: 0.9rem;
    }

    .container {
        padding: 25px;
    }

    p,
    li {
        font-size: 0.95rem;
    }

    .booth-list {
        grid-template-columns: 1fr;
        padding: 20px;
        width: 90%;
    }

    a {
        padding: 12px 24px;
        font-size: 16px;
    }

    .booth-link {
        font-size: 16px;
        padding: 12px;
    }

    button {
        padding: 15px 30px;
        font-size: 18px;
        position: relative;
        z-index: 100;
    }

    .video-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        max-width: 100vw;
        max-height: 100vh;
        width: 100vw;
        height: 100vh;
        margin: 0;
        z-index: 50;
        background: #000;
    }

    .video-container.active {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    #remoteVideo {
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        object-fit: cover;
        border-radius: 0;
        aspect-ratio: auto;
    }

    #localVideo {
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        object-fit: cover;
        border-radius: 0;
        aspect-ratio: auto;
    }

    #localVideo.small {
        position: absolute;
        bottom: 90px;
        right: 10px;
        width: 100px;
        max-width: 30%;
        height: auto;
        max-height: 150px;
        aspect-ratio: 4/3;
        object-fit: cover;
        border-radius: 8px;
    }

    .video-controls {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        gap: 15px;
        z-index: 200;
        display: flex;
    }

    .video-control-btn {
        width: 50px;
        height: 50px;
        padding: 0;
        font-size: 24px;
        flex-shrink: 0;
    }

    body {
        justify-content: flex-end;
        padding-bottom: 30px;
    }
}
