/* Estilos Gerais */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

h1, h2, h3, h4 {
    color: #2c3e50;
}

/* Layout Principal */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
}

.displays-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.camera-container, .gesture-container {
    position: relative;
    flex: 1;
    height: 500px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.container-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 10;
}

/* Camera e Canvas */
video, canvas {
    position: absolute;
    width: 100%;
    height: 100%;
}

.recognition-result {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    transition: transform 0.3s ease;
    transform: translateY(100%);
}

.recognition-result.show {
    transform: translateY(0);
}

/* Gesture Container */
.gesture-container {
    padding: 50px 20px 20px;
    display: flex;
    flex-direction: column;
}

.gesture-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 15px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.tab-btn:hover {
    background-color: #f9f9f9;
}

.tab-btn.active {
    border-bottom-color: #3498db;
    color: #3498db;
}

.tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
}

.tab-content.active {
    display: block;
}

/* Form Elements */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.recording-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}

.action-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.record-btn {
    background-color: #e74c3c;
}

.record-btn:hover {
    background-color: #c0392b;
}

.cancel-btn {
    background-color: #7f8c8d;
}

.cancel-btn:hover {
    background-color: #6c7a7d;
}

.cancel-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.recording-status {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #7f8c8d;
    margin-right: 5px;
}

.status-indicator.recording {
    background-color: #e74c3c;
    animation: pulse 1.5s infinite;
}

.recording-instructions {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
}

.recording-instructions ol {
    margin-left: 20px;
}

/* Gesture Library */
.gesture-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.gesture-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background-color: white;
    text-align: center;
    transition: transform 0.2s;
    position: relative;
}

.gesture-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.gesture-card h4 {
    margin-bottom: 10px;
    word-break: break-word;
}

.gesture-thumbnail {
    width: 100%;
    height: 100px;
    background-color: #f1f1f1;
    border-radius: 4px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gesture-actions {
    margin-top: 10px;
    display: flex;
    justify-content: space-around;
}

.gesture-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #3498db;
    font-size: 20px;
}

.gesture-btn.delete {
    color: #e74c3c;
}

.empty-state {
    text-align: center;
    padding: 30px;
    color: #7f8c8d;
    font-style: italic;
}

/* Settings Panel */
.settings-panel {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.settings-group {
    margin-bottom: 15px;
}

.settings-group label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.settings-group input[type="checkbox"] {
    margin-right: 8px;
}

.settings-group input[type="range"] {
    width: 100%;
    margin: 10px 0;
}

/* Animação */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .displays-container {
        flex-direction: column;
    }
    
    .camera-container, .gesture-container {
        height: 400px;
    }
}