body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #000;
}

#container {
    position: relative;
    width: 100%;
    height: 100%;
}

#debug-controls {
    position: fixed;
    top: 5px;
    right: 5px;
    z-index: 10000;
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.8);
    padding: 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

#debug-controls button {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    padding: 2px 8px;
    border-radius: 2px;
    transition: opacity 0.2s;
    font-family: 'Segoe UI', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

#debug-controls button:hover {
    opacity: 0.7;
}

#copy-logs-btn {
    display: none;
    border-left: 1px solid rgba(255, 255, 255, 0.2) !important;
}

#debug-console {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 30vh;
    background: #000;
    color: #fff;
    padding: 10px;
    padding-top: 40px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 10px;
    z-index: 9999;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-sizing: border-box;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: pre-wrap;
    word-break: break-all;
}

#debug-console.collapsed {
    transform: translateY(-100%);
}

#toggle-logs-btn.active {
    transform: rotate(180deg);
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

#start-button {
    pointer-events: auto;
    padding: 15px 30px;
    font-size: 18px;
    background-color: #fff;
    border: none;
    border-radius: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s;
}

#start-button:active {
    transform: scale(0.95);
}

#talk-button {
    pointer-events: auto;
    padding: 15px 30px;
    font-size: 18px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    display: none;
    /* Hidden by default */
    position: absolute;
    bottom: 30px;
}

#talk-button:active {
    transform: scale(0.95);
    background-color: #0056b3;
}

#scanning-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    height: 50vw;
    /* Aspect ratio of a typical business card */
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    pointer-events: none;
    z-index: 5;
    display: none;
    /* Hidden by default */
}

.hidden {
    display: none !important;
}

#api-key-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: none;
    /* Default hidden */
    justify-content: center;
    align-items: center;
}

#api-key-modal.show {
    display: flex;
}

#api-key-modal .modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 400px;
    text-align: center;
    color: #333;
}

#scanning-overlay.hidden {
    display: none !important;
}

#scanning-overlay:not(.hidden) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.inner {
    text-align: center;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.scan-line {
    width: 100%;
    height: 2px;
    background: #00ff00;
    animation: scan 2s infinite linear;
    margin-top: 10px;
}

@keyframes scan {
    0% {
        transform: translateY(-25vw);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(25vw);
        opacity: 0;
    }
}