@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

/* General Styles */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f7f9;
    color: #333;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.main-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    height: 50px;
    margin-right: 15px;
}

.main-header h1 {
    font-size: 1.5em;
    color: #311b92;
    margin: 0;
    font-weight: 700;
}

main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 40px 20px;
    box-sizing: border-box;
}

/* Home Page Styles */
.home-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    max-width: 1200px;
    width: 100%;
    align-items: flex-start;
}

.welcome-panel {
    background: #ffffff;
    padding: 40px;
    border-radius: 15px;
    border: 1px solid #e0e0e0;
}

.welcome-header {
    border-bottom: 2px solid #673ab7;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.welcome-header h2 {
    font-size: 2.2em;
    color: #311b92;
    margin: 0;
}

.welcome-subtitle {
    font-size: 1.2em;
    color: #555;
    margin-bottom: 30px;
}

.instructions {
    margin-bottom: 30px;
}

.instructions h4 {
    font-size: 1.1em;
    color: #333;
    margin-bottom: 15px;
}

.instructions ul {
    list-style-type: none;
    padding-left: 0;
}

.instructions li {
    background: url('assets/check-icon.svg') no-repeat left center;
    background-size: 20px;
    padding-left: 30px;
    margin-bottom: 10px;
    font-size: 1em;
    color: #555;
}

.support-text {
    font-size: 0.9em;
    color: #777;
    text-align: center;
}

.support-text a {
    color: #673ab7;
    text-decoration: none;
}

.action-panel {
    text-align: center;
    position: sticky;
    top: 120px; /* Adjust based on header height */
}

.card {
    background: #ffffff;
    padding: 40px;
    border-radius: 15px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

.action-panel h3 {
    font-size: 1.5em;
    color: #512da8;
    margin-top: 0;
}

.action-panel p {
    font-size: 1em;
    color: #555;
    line-height: 1.6;
}

.btn {
    background: linear-gradient(90deg, #7e57c2, #512da8);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 20px;
}

.btn:hover, .btn:focus {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(103, 58, 183, 0.4);
    outline: none;
}

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

.modal-content {
    max-width: 450px;
    width: 100%;
}

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

/* Test Section Styles */
#test-section {
    width: 100%;
    max-width: 1200px;
}

.test-container {
    background: #ffffff;
    padding: 20px;
    border-radius: 15px;
    border: 1px solid #e0e0e0;
    width: 100%;
}

.test-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.test-header h2 {
    flex-grow: 1;
}

.camera-feed {
    border: 2px solid #512da8;
    border-radius: 8px;
    padding: 10px;
    width: 150px; /* Decreased camera feed size */
    flex-shrink: 0;
    text-align: center;
}

#webcam {
    width: 100%;
    border-radius: 6px;
}

.camera-note {
    font-size: 0.8em;
    color: #555;
    margin-top: 8px;
    margin-bottom: 0;
}

.iframe-container {
    position: relative;
    width: 100%;
    height: 80vh; /* Increased height */
    border: none; /* Removed border */
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Responsive Design */
@media (max-width: 992px) {
    .home-container {
        grid-template-columns: 1fr;
    }
    .action-panel {
        position: static;
        top: auto;
    }
}
