:root {
    --bg: #000;
    --fg: #fff;
    --glass: rgba(0, 0, 0, 0.4);
    --glow: #6f00ff;
    --btn-bg: rgba(0, 0, 0, 0.8);
    --btn-border: rgba(255, 255, 255, 0.3);
    --btn-hover: rgba(255, 255, 255, 0.12);
    --radius: 16px;
    --text-glow: 0 0 10px #fff, 0 0 20px var(--glow);
    --transition: all 0.2s ease;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    background: var(--bg);
    overflow: hidden;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--fg);
}

.stage {
    position: fixed;
    inset: 0;
}

#introVideo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--bg);
    opacity: 0;
    animation: fadeVideo 1.2s ease-in forwards;
}

@keyframes fadeVideo {
    to { opacity: 1; }
}

@media (max-width: 768px) and (orientation: portrait) {
    #introVideo {
        object-fit: cover;
        object-position: center;
        transform: scaleY(1.2);
    }
}

.content-window {
    position: absolute;
    top: 2em;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1em;
    padding: 2em;
    max-width: 700px;
    width: min(92vw, 700px);
    text-align: center;
    backdrop-filter: blur(12px);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    opacity: 1;
    max-height: calc(100vh - 8em);
    overflow-y: auto;
    margin-bottom: 4em;
}

h1 {
    margin: 0.2em 0 0.1em;
    font-size: 2rem;
    font-weight: 600;
    text-shadow: var(--text-glow);
}

h2 {
    margin: 0.2em 0 1em;
    font-size: 1rem;
    color: #ccc;
    font-weight: 400;
}

p {
    color: #e0e0e0;
    line-height: 1.6;
    margin: 0.7em 0;
    font-size: 0.9rem;
}

.actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1.5em 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--btn-bg);
    border: 1px solid var(--btn-border);
    border-radius: var(--radius);
    color: var(--fg);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    backdrop-filter: blur(8px);
    text-decoration: none;
    min-width: 180px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn:hover {
    background: var(--btn-hover);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.btn:hover::before {
    transform: translateX(100%);
}

.btn:active {
    transform: translateY(0);
}

.btn.primary {
    background: rgba(26, 26, 26, 0.9);
    border-color: var(--glow);
    box-shadow: 0 0 20px rgba(111, 0, 255, 0.3);
}

.btn.primary:hover {
    background: rgba(40, 40, 40, 0.9);
    box-shadow: 0 0 30px rgba(111, 0, 255, 0.5);
}

.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-loading.show {
    opacity: 1;
}

.speaker-icon {
    width: 18px;
    height: 18px;
    background-size: contain;
    background-repeat: no-repeat;
    transition: background-image 0.2s ease;
}

.speaker-off {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z"/></svg>');
}

.speaker-on {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"/></svg>');
}

/* Visitor Stats */
/* Stats panel outer width (desktop) */
.visitor-stats-wrapper {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;         /* fits a 300px image + padding */
    z-index: 9999;
}

/* Make the card fill the wrapper width */
.visitor-stats {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(111, 0, 255, 0.3);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    width: 100%;
}

/* Allow content to fully expand */
.visitor-stats .stats-content {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    padding: 0 0.75rem;
    background: rgba(0, 0, 0, 0.95);
    transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease;
    will-change: max-height, opacity;
    text-align: center;
}
.visitor-stats .stats-content.expanded {
    opacity: 1;
    padding: 0.75rem;
    max-height: 700px;    /* plenty of room for the image */
}

/* The preview image size inside the panel */
.visitor-stats .map {
    display: block;
    margin: 0.75em auto;
    width: 250px !important;   /* target width */
    max-width: 95%;
    height: auto;
    border-radius: 25px !important;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

/* Responsive widths for smaller screens */
@media (max-width: 991px) {
  .visitor-stats-wrapper { width: 250px; }
  .visitor-stats .map { width: 280px !important; border-radius: 20px !important; }
}
@media (max-width: 768px) {
  .visitor-stats-wrapper { width: 280px; }
}
@media (max-width: 480px) {
  .visitor-stats-wrapper { width: 260px; }
  .visitor-stats .map { width: 250px !important; border-radius: 15px !important; }
}


.visitor-stats {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(111, 0, 255, 0.3);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.visitor-stats .stats-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.5rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.visitor-stats .stats-toggle:hover {
    background: rgba(111, 0, 255, 0.1);
    color: #fff;
}

.visitor-stats .stats-toggle .chev {
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    transform: rotate(0deg);
    transition: transform 0.25s ease;
}

.visitor-stats .stats-toggle.expanded .chev {
    transform: rotate(180deg);
}

.visitor-stats .stats-content {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    padding: 0 0.75rem;
    background: rgba(0, 0, 0, 0.95);
    transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease;
    will-change: max-height, opacity;
    text-align: center;
}

.visitor-stats .stats-content.expanded {
    opacity: 1;
    padding: 0.75rem;
}

.visitor-stats .stats-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.75rem;
    margin: 0.4em 0;
}

.visitor-stats .stats-content a {
    color: #a78bfa;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.7rem;
}

.visitor-stats .stats-content a:hover {
    color: #c4b5fd;
    text-decoration: underline;
}

.visitor-stats .map {
    display: block;
    margin: 0.75em auto;
    width: 250px !important;
    max-width: 95%;
    height: auto;
    border-radius: 25px !important;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.visitor-stats .map:hover {
    transform: scale(1.02);
}

/* Responsive */
@media (max-width: 991px) {
    .visitor-stats .map {
        width: 280px !important;
        border-radius: 20px !important;
    }
}

@media (max-width: 768px) {
    .content-window {
        padding: 1em;
        top: 0.5em;
        max-width: 90vw;
        max-height: calc(100vh - 5em);
    }
    
    h1 {
        font-size: 1.4rem;
        margin: 0.1em 0;
    }
    
    h2 {
        font-size: 0.8rem;
        margin: 0.1em 0 0.5em;
    }
    
    .btn {
        padding: 8px 12px;
        min-width: 120px;
        font-size: 0.8rem;
    }
    
    .actions {
        margin-top: 0.8em;
        gap: 8px;
    }

    .visitor-stats-wrapper {
        width: 80px;
    }

    .visitor-stats .stats-toggle {
        font-size: 0.65rem;
        padding: 0.4rem;
    }
}

@media (max-width: 480px) {
    .actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 240px;
    }

    .visitor-stats-wrapper {
        width: 70px;
    }
    
    .visitor-stats .map {
        width: 250px !important;
        border-radius: 15px !important;
    }
}




/* Black background for the section */
.map-container {
    background-color: #000;
    padding: 20px;
    text-align: center;
    color: #fff;
    font-family: Arial, sans-serif;
}

/* Styles for the map image */
img.map {
    display: block;
    margin: 0 auto;
    width: 75%;
    height: auto;
    border-radius: 75px !important;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(255, 255, 255, 0.1);
}

/* Styles for smaller devices */
@media (max-width: 991px) {
    img.map {
        width: 400px;
        height: auto;
        border-radius: 25px !important;
    }
}

/* Small text for the domain display */
.small-text {
    margin-top: 10px;
    font-size: 0.8em;
    color: #ccc;
}