* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a0033 0%, #330066 50%, #1a0033 100%);
    color: #ffffff;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(102, 51, 153, 0.8);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.logo h1 {
    font-size: 3rem;
    background: linear-gradient(45deg, #ff6ec7, #ff3d9a, #c2185b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-shadow: 0 0 30px rgba(255, 110, 199, 0.3);
}

.subtitle {
    font-size: 1.3rem;
    color: #90caf9;
    margin-bottom: 15px;
}

.tagline {
    font-size: 1rem;
    color: #bbbbbb;
    font-style: italic;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}



.welcome-section p {
    font-size: 1.1rem;
    color: #bbbbbb;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding: 20px;
}

@media (max-width: 768px) {
    .action-buttons {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
        padding: 15px;
    }
}

.action-btn {
    background: linear-gradient(135deg, rgba(102, 51, 153, 0.9) 0%, rgba(255, 110, 199, 0.2) 100%);
    border: 2px solid rgba(255, 110, 199, 0.3);
    border-radius: 15px;
    padding: 25px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.action-btn:hover {
    transform: translateY(-5px);
    border-color: #ff6ec7;
    box-shadow: 0 10px 30px rgba(255, 110, 199, 0.3);
    background: linear-gradient(135deg, rgba(255, 110, 199, 0.3) 0%, rgba(255, 61, 154, 0.2) 100%);
}

.action-btn:active {
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.btn-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ff6ec7;
}

.btn-desc {
    font-size: 0.9rem;
    color: #bbbbbb;
    text-align: center;
}

.btn-image-container {
    width: 100%;
    height: 150px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 2px solid rgba(255, 110, 199, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

@media (max-width: 768px) {
    .btn-image-container {
        height: 180px;
    }
}

.btn-image {
    width: 100%;
    height: 180px;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.3s ease;
    background: rgba(0, 0, 0, 0.1);
}

.action-btn:hover .btn-image-container {
    border-color: #ff6ec7;
    box-shadow: 0 5px 15px rgba(255, 110, 199, 0.3);
}

.action-btn:hover .btn-image {
    transform: scale(1.05);
}

.viewer-count {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 10;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}



.footer {
    text-align: center;
    padding: 30px;
    margin-top: 40px;
    background: rgba(102, 51, 153, 0.6);
    border-radius: 15px;
    border-top: 1px solid rgba(255, 110, 199, 0.3);
}

.footer p {
    color: #bbbbbb;
    margin: 5px 0;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #330066 0%, #1a0033 100%);
    margin: 3% auto;
    padding: 30px;
    border: 2px solid rgba(255, 110, 199, 0.5);
    border-radius: 20px;
    width: 95%;
    max-width: 800px;
    text-align: center;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close:hover {
    color: #64b5f6;
}

.camera-container {
    margin: 20px 0;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid rgba(255, 110, 199, 0.3);
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 51, 153, 0.8);
}

#cameraPreview {
    width: 100%;
    height: 450px;
    object-fit: cover;
    background: #000;
    border-radius: 10px;
}

.recording-indicator {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(100, 181, 246, 0.9);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: none;
    align-items: center;
    gap: 8px;
}

.recording-indicator.active {
    display: flex;
}

.recording-dot {
    width: 12px;
    height: 12px;
    background: #42a5f5;
    border-radius: 50%;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.verification-progress {
    margin: 20px 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #64b5f6, #42a5f5);
    width: 0%;
    transition: width 0.3s ease;
}

#progressText {
    color: #bbbbbb;
    font-size: 0.9rem;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.verify-btn, .cancel-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.verify-btn {
    background: linear-gradient(45deg, #64b5f6, #42a5f5);
    color: white;
}

.verify-btn:hover {
    background: linear-gradient(45deg, #42a5f5, #1e88e5);
    transform: translateY(-2px);
}

.verify-btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
}

.cancel-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .logo h1 {
        font-size: 2.2rem;
    }

    .action-buttons {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }

    #cameraPreview {
        height: 350px;
    }
    
    /* Mobile responsive for square loading containers */
    #initialLoadingDisplay,
    #recordingLoadingContainer {
        width: 350px !important;
        height: 350px !important;
        padding: 20px !important;
        border-width: 5px !important;
    }
    
    #initialLoadingDisplay video,
    #recordingLoadingContainer video {
        width: 150px !important;
        height: 150px !important;
        margin-bottom: 15px !important;
    }
    
    #initialLoadingDisplay .loading-text,
    #recordingLoadingContainer .loading-text {
        font-size: 1.3rem !important;
    }
}

@media (max-width: 480px) {
    #initialLoadingDisplay,
    #recordingLoadingContainer {
        width: 300px !important;
        height: 300px !important;
        padding: 15px !important;
        border-width: 4px !important;
    }
    
    #initialLoadingDisplay video,
    #recordingLoadingContainer video {
        width: 120px !important;
        height: 120px !important;
    }
}