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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
}

.back-link {
    position: absolute;
    left: 30px;
    top: 30px;
    color: white;
    text-decoration: none;
    font-size: 1.1em;
    padding: 8px 15px;
    background: rgba(255,255,255,0.2);
    border-radius: 5px;
    transition: background 0.3s;
}

.back-link:hover {
    background: rgba(255,255,255,0.3);
}

main {
    padding: 40px;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fee;
    border-left: 4px solid #f44;
    color: #c00;
}

.info-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 4px solid #667eea;
}

.info-card h2 {
    color: #667eea;
    margin-bottom: 15px;
}

.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.card h3 {
    color: #333;
    margin-bottom: 15px;
}

.card p {
    color: #666;
    margin-bottom: 20px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: scale(1.05);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: scale(1.05);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: scale(1.05);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
    transform: scale(1.05);
}

.btn-disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
}

.info-section, .features {
    margin-bottom: 30px;
}

.info-section h3, .features h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.info-section ol, .features ul {
    padding-left: 25px;
    color: #555;
    line-height: 1.8;
}

.info-section li, .features li {
    margin-bottom: 10px;
}

/* Registration Page */
.registration-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.camera-section {
    text-align: center;
}

.video-container {
    position: relative;
    max-width: 640px;
    margin: 20px auto;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

video {
    width: 100%;
    display: block;
    background: #000;
    min-height: 360px;
}

.overlay-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s;
    width: 0%;
}

.status-text {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin: 10px 0;
}

.message-text {
    font-size: 1em;
    margin: 10px 0;
    min-height: 24px;
}

.button-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.tips {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: left;
}

.tips h4 {
    color: #667eea;
    margin-bottom: 10px;
}

.tips ul {
    padding-left: 20px;
    color: #555;
    line-height: 1.8;
}

/* Tracking Page */
.tracking-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

@media (max-width: 1024px) {
    .tracking-layout {
        grid-template-columns: 1fr;
    }
}

.video-panel {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
}

.video-panel h2 {
    color: #667eea;
    margin-bottom: 20px;
}

.control-buttons {
    text-align: center;
    margin: 20px 0;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-top: 15px;
}

.status-bar p {
    margin: 0;
    color: #666;
}

.dashboard-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dashboard-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
}

.dashboard-card h3 {
    color: #667eea;
    margin-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.dashboard-card p {
    margin: 10px 0;
    color: #555;
}

.status-indicator {
    text-align: center;
    padding: 10px 0;
}

.badge {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1.1em;
}

.badge-green {
    background: #d4edda;
    color: #155724;
}

.badge-orange {
    background: #fff3cd;
    color: #856404;
}

.badge-gray {
    background: #e2e3e5;
    color: #383d41;
}

footer {
    background: #f8f9fa;
    text-align: center;
    padding: 20px;
    color: #666;
    border-top: 1px solid #e0e0e0;
}
