body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Microsoft JhengHei', '微軟正黑體', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.container {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 700px;
    text-align: center;
}

h1 {
    color: #1a73e8;
    margin-bottom: 1.5rem;
}

h2 {
    color: #3c4043;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

#qr-reader {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    background-color: #e8f0fe;
    color: #1967d2;
    border: 1px solid #d2e3fc;
}

.message.success {
    background-color: #e6f4ea;
    color: #1e8e3e;
    border-color: #ceead6;
}

.message.error {
    background-color: #fce8e6;
    color: #d93025;
    border-color: #f9c6c2;
}

.large-text {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.hidden {
    display: none;
}

#student-info-container {
    margin-top: 1.5rem;
    text-align: left;
    border-top: 1px solid #e0e0e0;
    padding-top: 1.5rem;
}

#student-details p {
    font-size: 1.1rem;
    margin: 0.5rem 0;
}

.button {
    display: inline-block;
    background-color: #1a73e8;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    margin-top: 1rem;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.button:hover {
    background-color: #185abc;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.button:disabled {
    background-color: #d2e3fc;
    cursor: not-allowed;
}

.button.secondary {
    background-color: #e8eaed;
    color: #3c4043;
}

.button.secondary:hover {
    background-color: #dadce0;
}

.video-container {
    position: relative;
    width: 640px;
    height: 480px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
}

#video {
    width: 100%;
    height: 100%;
}

#face-box {
    position: absolute;
    border: 3px solid rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.8);
    transition: all 0.2s ease-in-out;
}

.preview-image {
    max-width: 100%;
    height: auto;
    max-height: 480px;
    border-radius: 8px;
    border: 2px solid #ddd;
}

.controls {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}
