* {
    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;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 2.5rem;
    color: #4f46e5;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    color: #64748b;
    font-weight: 400;
}

.control-panel {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.btn {
    padding: 14px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
}

.camera-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.permission-box {
    padding: 60px 20px;
}

.permission-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

.permission-box h3 {
    font-size: 1.5rem;
    color: #4f46e5;
    margin-bottom: 10px;
}

.permission-box p {
    color: #64748b;
    font-size: 1rem;
}

#cameraFeed {
    width: 100%;
    max-width: 600px;
    border-radius: 15px;
    display: none;
    background: #000;
    margin: 0 auto;
}

.sections {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

.section-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.section-card:nth-child(1) {
    border-color: #667eea;
}

.section-card:nth-child(2) {
    border-color: #f093fb;
}

.section-card:nth-child(3) {
    border-color: #4ade80;
}

.section-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    padding: 15px 20px;
    border-radius: 12px;
    margin: -10px -10px 20px -10px;
}

.section-card:nth-child(2) .section-header {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.1) 0%, rgba(245, 87, 108, 0.1) 100%);
}

.section-card:nth-child(3) .section-header {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.1) 0%, rgba(22, 163, 74, 0.1) 100%);
}

.section-icon {
    font-size: 2.5rem;
}

.section-header h2 {
    font-size: 1.4rem;
    color: #4f46e5;
    font-weight: 700;
}

.section-card:nth-child(2) .section-header h2 {
    color: #f5576c;
}

.section-card:nth-child(3) .section-header h2 {
    color: #16a34a;
}

.placeholder-chart {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 150px;
    background: #f8fafc;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.chart-bar {
    width: 30px;
    background: linear-gradient(to top, #667eea, #764ba2);
    border-radius: 5px 5px 0 0;
    transition: height 0.5s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.section-card:nth-child(2) .chart-bar {
    background: linear-gradient(to top, #f093fb, #f5576c);
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.3);
}

.section-card:nth-child(3) .chart-bar {
    background: linear-gradient(to top, #4ade80, #16a34a);
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}

.time-display {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin-bottom: 20px;
}

.time-item {
    flex: 1;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.section-card:nth-child(2) .time-item {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
}

.time-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.time-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
}

.path-visualization {
    background: #f8fafc;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.path-svg {
    width: 100%;
    height: 180px;
}

.path-svg circle,
.path-svg line {
    transition: all 0.8s ease-in-out;
}

.section-desc {
    color: #64748b;
    font-size: 0.95rem;
    text-align: center;
    line-height: 1.6;
}

.footer {
    text-align: center;
    padding: 25px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.footer p {
    color: #64748b;
    font-size: 0.95rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h2 {
    font-size: 1.8rem;
    color: #4f46e5;
    margin-bottom: 20px;
}

.modal-content p {
    color: #64748b;
    margin-bottom: 15px;
    line-height: 1.6;
}

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

@media (max-width: 1024px) {
    .sections {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }

    .sections {
        grid-template-columns: 1fr;
    }

    .control-panel {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
