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

.fsd-wrapper {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fff;

    display: flex;
    flex-direction: column;
    align-items: center;

}

.fsd-container {
    max-width: 1200px;
    width: 100%;

    background: white;
    border-radius: 20px;
    /* box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); */
    overflow: hidden;
    border: 1px solid #667eea;
}

.fsd-header {
    background: #fff;
    color: #000;
    padding: 30px;
    text-align: center;
}

.fsd-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.fsd-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.fsd-content {
    padding: 30px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: flex-start;
}

.fsd-video-container {
    position: relative;
    background: #f5f5f5;
    border-radius: 10px;
    overflow: hidden;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

#fsd-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    max-width: 100%;
}

#fsd-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.fsd-results {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.fsd-result-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.fsd-result-card h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.fsd-result-card .fsd-value {
    font-size: 1.5rem;
    color: #667eea;
    font-weight: bold;
    margin-top: 10px;
}

.fsd-result-card .fsd-description {
    color: #666;
    margin-top: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.fsd-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px 30px;
    /* background: #f8f9fa; */
}

.fsd-header p {
    font-size: 1.5rem !important;
}

.fsd-secondary-controls {
    padding-top: 0;
    border-top: 1px solid #e0e0e0;
}

.fsd-btn {
    padding: 12px 30px;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

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

.fsd-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.fsd-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.fsd-btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.fsd-btn-secondary:hover {
    background: #d0d0d0;
}

.fsd-btn-secondary:active {
    background: #c0c0c0;
}

.fsd-status {
    text-align: center;
    padding: 15px;
    background: #fff3cd;
    color: #856404;
    margin: 20px 30px;
    border-radius: 8px;
    font-weight: 500;
}

.fsd-status.fsd-success {
    background: #d4edda;
    color: #155724;
}

.fsd-status.fsd-error {
    background: #f8d7da;
    color: #721c24;
}

.fsd-measurements {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.fsd-measurement-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.fsd-measurement-item:last-child {
    border-bottom: none;
}

.fsd-measurement-label {
    color: #666;
    font-weight: 500;
}

.fsd-measurement-value {
    color: #333;
    font-weight: 600;
}

@media (max-width: 768px) {
    .fsd-wrapper {
        padding: 10px;
    }


    .fsd-header p {
        font-size: 0.85rem !important;
    }

    .fsd-container {
        border-radius: 15px;
    }

    .fsd-header {
        padding: 20px 15px;
    }

    .fsd-header h1 {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }

    .fsd-header p {
        font-size: 0.95rem;
    }

    .fsd-content {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 20px;
    }

    .fsd-video-container {
        min-height: 300px;
        border-radius: 8px;
    }

    .fsd-controls {
        flex-direction: column;
        padding: 15px;
        gap: 10px;
    }
    
    .fsd-secondary-controls {
        padding-top: 10px;
    }

    .fsd-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 0.95rem;
    }

    .fsd-status {
        margin: 15px;
        padding: 12px;
        font-size: 0.9rem;
    }

    .fsd-result-card {
        padding: 15px;
    }

    .fsd-result-card h3 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .fsd-result-card .fsd-value {
        font-size: 1.3rem;
    }

    .fsd-result-card .fsd-description {
        font-size: 0.9rem;
    }

    .fsd-measurement-item {
        padding: 6px 0;
        flex-wrap: wrap;
    }

    .fsd-measurement-label,
    .fsd-measurement-value {
        font-size: 0.9rem;
    }

    #fsd-allEmotions {
        font-size: 0.8rem !important;
    }
}

@media (max-width: 480px) {
    .fsd-header h1 {
        font-size: 1.5rem;
    }

    .fsd-header p {
        font-size: 0.85rem;
    }

    .fsd-content {
        padding: 10px;
    }

    .fsd-video-container {
        min-height: 250px;
    }

    .fsd-btn {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
}

.fsd-loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: fsd-spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes fsd-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

