﻿html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
}

.wrapper {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    flex-direction: column;
}

.loader-container {
    padding: 20px;
}

.loader {
    border: 6px solid #e0e0e0;
    border-top: 6px solid #007bff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#loading-text {
    font-size: 1.25rem;
    color: #333;
    white-space: pre-line;
    word-break: break-word;
}

.join-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    padding-bottom: 40px;
}

.join-button {
    padding: 14px 28px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    background: #007bff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
}

    .join-button:hover {
        background: #0056d2;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
        transform: translateY(-2px);
    }

    .join-button:active {
        transform: scale(0.98);
    }


.restart-button {
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: #6c757d;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
    margin-right: 10px;
}

    .restart-button:hover {
        background: #5c636a;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
        transform: translateY(-2px);
    }

    .restart-button:active {
        transform: scale(0.98);
    }


.complete-button {
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: #198754;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
}

    .complete-button:hover {
        background: #157347;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
        transform: translateY(-2px);
    }

    .complete-button:active {
        transform: scale(0.98);
    }



#mtg-frame-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    max-width: 100vw;
    position: relative;
    background-color: #000;
    overflow: hidden;
}

.meeting-frame {
    flex: 1;
    width: 100vw;
    max-width: 100vw;
    background-color: #111;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.local-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #000;
    transform: scaleX(-1);
}

.camera-switch-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

    .camera-switch-btn:hover {
        background-color: rgba(0, 0, 0, 0.8);
        transform: scale(1.1);
    }

    .camera-switch-btn:active {
        transform: scale(0.95);
    }

    .camera-switch-btn svg {
        width: 24px;
        height: 24px;
    }

.user-help-container {
    position: absolute;
    top: 70px;
    padding: 16px;
    border-radius: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
}

.user-help-container-pending {
    background-color: rgba(0, 0, 255, 0.8);
}

.user-help-container-error {
    background-color: rgba(255, 0, 0, 0.8);
}

.user-help-container-success {
    background-color: rgba(0, 255, 0, 0.8);
}

.face-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 5;
}

.video-overlay {
    position: relative;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
}

    .video-overlay::before {
        content: '';
        position: absolute;
        width: 80vw;
        height: 80vh;
        max-width: 400px;
        max-height: 500px;
        border: 3px solid #007bff;
        border-radius: 50%;
        background: transparent;
        box-shadow: 0 0 20px rgba(0, 123, 255, 0.5);
        animation: pulse-border 2s infinite;
    }

    .video-overlay.face-detected::before {
        border-color: #28a745;
        box-shadow: 0 0 20px rgba(40, 167, 69, 0.6);
        animation: pulse-green 2s infinite;
    }

    .video-overlay.no-face-detected::before {
        border-color: #dc3545;
        box-shadow: 0 0 20px rgba(220, 53, 69, 0.6);
        animation: pulse-red 2s infinite;
    }

@keyframes pulse-border {
    0% {
        border-color: #007bff;
        box-shadow: 0 0 20px rgba(0, 123, 255, 0.5);
    }

    50% {
        border-color: #00d4ff;
        box-shadow: 0 0 30px rgba(0, 212, 255, 0.8);
    }

    100% {
        border-color: #007bff;
        box-shadow: 0 0 20px rgba(0, 123, 255, 0.5);
    }
}

@keyframes pulse-green {
    0% {
        border-color: #28a745;
        box-shadow: 0 0 20px rgba(40, 167, 69, 0.6);
    }

    50% {
        border-color: #34ce57;
        box-shadow: 0 0 30px rgba(52, 206, 87, 0.8);
    }

    100% {
        border-color: #28a745;
        box-shadow: 0 0 20px rgba(40, 167, 69, 0.6);
    }
}

@keyframes pulse-red {
    0% {
        border-color: #dc3545;
        box-shadow: 0 0 20px rgba(220, 53, 69, 0.6);
    }

    50% {
        border-color: #e74c3c;
        box-shadow: 0 0 30px rgba(231, 76, 60, 0.8);
    }

    100% {
        border-color: #dc3545;
        box-shadow: 0 0 20px rgba(220, 53, 69, 0.6);
    }
}

.meeting-footer {
    height: 100px;
    width: 100vw;
    max-width: 100vw;
    background-color: #f1f1f1;
    border-top: 1px solid #ccc;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
}

.confirmation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.scroll-wrapper {
    height: 4.2em;
    width: 300px;
    overflow: hidden;
    position: relative;
    font-size: 1.2rem;
    line-height: 1.6;
    color: white;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
}

.scroll-text {
    position: absolute;
    white-space: normal;
    transform: translateY(100%);
    width: 280px;
}


@keyframes scroll-up {
    0% {
        transform: translateY(0%);
    }

    100% {
        transform: translateY(-100%);
    }
}

.popup-content {
    background-color: #fff;
    color: #333;
    padding: 10px;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.popup-button {
    margin-top: 20px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

    .popup-button:hover {
        background-color: #0056d2;
    }

.popup-button:disabled {
    background-color: #cccccc;
    color: #777777;
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
}



#countdownOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

    #countdownOverlay span {
        font-size: 8rem;
        color: #fff;
        font-weight: bold;
    }

@keyframes fadeScale {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: 1;
        transform: scale(1.3);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

#countdownNumber.animate {
    animation: fadeScale 0.6s ease-out;
}


.recording-indicator {
    z-index: 999999;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    color: white;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    backdrop-filter: blur(4px);
}

.recording-dot {
    width: 16px;
    height: 16px;
    background: #ff4444;
    border-radius: 50%;
    margin-right: 8px;
    animation: recording-pulse 1s ease-in-out infinite alternate;
}

@keyframes recording-pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0.6;
        transform: scale(0.8);
    }
}

#preview-loading-container {
    text-align: center;
}

#preview-text {
    font-size: 1.25rem;
    color: #333;
    white-space: pre-line;
    word-break: break-word;
}

#noise-scale-container {
    width: 100%;
    height: 16px;
    background: #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
    margin-top: 10px;
    position: relative;
}

#noise-scale-fill {
    height: 100%;
    width: 0%;
    background-color: #5cb85c;
    transition: width 0.1s linear, background-color 0.2s linear;
}

.otp-wrapper {
    text-align: center;
    padding: 40px 20px;
    background: #f5f5f5;
    margin: 0;
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.otp-title {
    color: #000;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 40px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.otp-input-container {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.otp-input {
    width: 60px;
    height: 60px;
    border: 1px solid #000;
    border-radius: 8px;
    background: #fff;
    color: #000;
    font-size: 24px;
    font-weight: 400;
    text-align: center;
    transition: all 0.2s ease;
    outline: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

    .otp-input:focus {
        border-color: #007AFF;
        background: #fff;
    }

.otp-input-filled {
    border-color: #000;
    background: #fff;
}

.otp-input-error {
    border-color: #ff0000 !important;
    background: #fff !important;
}

.otp-input-success {
    border-color: #00C851 !important;
    background: #fff !important;
}

.otp-input-loading {
    border-color: #007AFF !important;
    background: #fff !important;
}

.otp-error, .otp-success {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-weight: 400;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin-bottom: 20px;
}

.otp-error {
    color: #ff0000;
}

.otp-success {
    color: #00C851;
}

.error-icon, .success-icon {
    font-size: 18px;
}

.virtual-keyboard {
    margin-top: 20px;
    padding: 0;
    background: transparent;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

    .keyboard-row:last-child {
        margin-bottom: 0;
    }

.keyboard-btn {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: #e0e0e0;
    color: #000;
    font-size: 20px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

    .keyboard-btn:hover {
        background: #d0d0d0;
    }

    .keyboard-btn:active {
        background: #c0c0c0;
        transform: scale(0.95);
    }

.keyboard-btn-clear {
    background: #e0e0e0;
    font-size: 14px;
    width: 80px;
    border-radius: 8px;
}

    .keyboard-btn-clear:hover {
        background: #d0d0d0;
    }

.keyboard-btn-remove {
    background: transparent;
    border-radius: 0px;
    border: 0px;
    width: 60px;
}

    .keyboard-btn-remove:hover {
        background: #d0d0d0;
    }

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

@keyframes successPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes loadingPulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile optimizations */
@media (max-width: 480px) {
    .otp-wrapper {
        padding: 20px 15px;
    }

    .otp-title {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .otp-input {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .otp-input-container {
        gap: 12px;
        margin-bottom: 40px;
    }

    .keyboard-btn {
        width: 70px;
        height: 70px;
        font-size: 18px;
    }

    .keyboard-btn-clear {
        width: 70px;
        font-size: 12px;
    }

    .keyboard-row {
        gap: 15px;
        margin-bottom: 15px;
    }
}

@media (max-width: 360px) {
    .otp-input {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .otp-input-container {
        gap: 10px;
    }

    .keyboard-btn {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }

    .keyboard-btn-clear {
        width: 65px;
        font-size: 11px;
    }

    .keyboard-row {
        gap: 12px;
    }
}