/* Biometrics Minigame Styles */

.biometrics-minigame-container {
    /* Compact interface similar to Bluetooth scanner */
    position: fixed !important;
    top: 5vh !important;
    right: 2vw !important;
    width: 350px !important;
    height: auto !important;
    max-height: 60vh !important;
    background: linear-gradient(135deg, #2e1a1a 0%, #3e1616 50%, #600f0f 100%) !important;
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.3), inset 0 0 10px rgba(231, 76, 60, 0.1) !important;
    border: 4px solid #e74c3c !important;
    clip-path: polygon(
      0px calc(100% - 10px),
      2px calc(100% - 10px),
      2px calc(100% - 6px),
      4px calc(100% - 6px),
      4px calc(100% - 4px),
      6px calc(100% - 4px),
      6px calc(100% - 2px),
      10px calc(100% - 2px),
      10px 100%,
      calc(100% - 10px) 100%,
      calc(100% - 10px) calc(100% - 2px),
      calc(100% - 6px) calc(100% - 2px),
      calc(100% - 6px) calc(100% - 4px),
      calc(100% - 4px) calc(100% - 4px),
      calc(100% - 4px) calc(100% - 6px),
      calc(100% - 2px) calc(100% - 6px),
      calc(100% - 2px) calc(100% - 10px),
      100% calc(100% - 10px),
      100% 10px,
      calc(100% - 2px) 10px,
      calc(100% - 2px) 6px,
      calc(100% - 4px) 6px,
      calc(100% - 4px) 4px,
      calc(100% - 6px) 4px,
      calc(100% - 6px) 2px,
      calc(100% - 10px) 2px,
      calc(100% - 10px) 0px,
      10px 0px,
      10px 2px,
      6px 2px,
      6px 4px,
      4px 4px,
      4px 6px,
      2px 6px,
      2px 10px,
      0px 10px
    ) !important;
    color: #e0e0e0 !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
}

.biometrics-minigame-container.expanded {
    width: 450px !important;
    max-height: 70vh !important;
}

.biometrics-minigame-game-container {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    position: relative !important;
    overflow: visible !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 15px !important;
    box-sizing: border-box !important;
}

/* Scanner Header */
.biometrics-scanner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid #e74c3c;
    /* border-radius: 6px; */
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.2);
}

.biometrics-scanner-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: bold;
    color: #e74c3c;
    text-shadow: 0 0 5px rgba(231, 76, 60, 0.5);
}

.samples-count-header {
    font-size: 12px;
    color: #4caf50;
    background: rgba(76, 175, 80, 0.2);
    padding: 2px 6px;
    /* border-radius: 3px; */
    border: 1px solid #4caf50;
    margin-left: auto;
}

.scanner-icon {
    height: 24px;
    filter: drop-shadow(0 0 3px rgba(231, 76, 60, 0.5));
    image-rendering: pixelated;
}

.biometrics-scanner-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #4caf50;
}

.scanner-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4caf50;
    box-shadow: 0 0 6px rgba(76, 175, 80, 0.8);
    animation: pulse 2s infinite;
}

.scanner-indicator.active {
    background: #4caf50;
}

.scanner-indicator.inactive {
    background: #f44336;
    animation: none;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

/* Expand/Collapse Toggle */
.biometrics-expand-toggle {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 24px;
    height: 24px;
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid #e74c3c;
    /* border-radius: 4px; */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #e74c3c;
    transition: all 0.3s ease;
    z-index: 10;
}

.biometrics-expand-toggle:hover {
    background: rgba(231, 76, 60, 0.3);
    box-shadow: 0 0 8px rgba(231, 76, 60, 0.4);
}

.biometrics-expand-toggle.expanded {
    transform: rotate(180deg);
}

/* Search Room Button */
.biometrics-search-room-container {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    padding: 10px;
    background: rgba(231, 76, 60, 0.1);
    /* border-radius: 6px; */
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.2);
}

/* Controls */
.biometrics-scanner-controls {
    margin-bottom: 10px;
    transition: all 0.3s ease;
    max-height: 200px;
    overflow: hidden;
}

.biometrics-minigame-container:not(.expanded) .biometrics-scanner-controls {
    max-height: 0;
    margin-bottom: 0;
    opacity: 0;
}

.biometrics-search-container {
    margin-bottom: 10px;
}

.biometrics-search-input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #e74c3c;
    /* border-radius: 6px; */
    color: #e0e0e0;
    font-size: 14px;
    box-shadow: 0 0 8px rgba(231, 76, 60, 0.2);
    transition: all 0.3s ease;
}

.biometrics-search-input:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.4);
    background: rgba(0, 0, 0, 0.5);
}

.biometrics-search-input::placeholder {
    color: #888;
}

.biometrics-categories {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.biometrics-category {
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #555;
    /* border-radius: 4px; */
    cursor: pointer;
    font-size: 12px;
    color: #ccc;
    transition: all 0.3s ease;
    user-select: none;
}

.biometrics-category:hover {
    background: rgba(231, 76, 60, 0.2);
    border-color: #e74c3c;
    color: #e74c3c;
}

.biometrics-category.active {
    background: rgba(231, 76, 60, 0.3);
    border-color: #e74c3c;
    color: #e74c3c;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.3);
}

/* Action Buttons */
.biometrics-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.biometrics-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid #e74c3c;
    /* border-radius: 6px; */
    color: #e74c3c;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.biometrics-action-btn:hover {
    background: rgba(231, 76, 60, 0.3);
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.4);
    transform: translateY(-1px);
}

.biometrics-action-btn.active {
    background: rgba(76, 175, 80, 0.3);
    border-color: #4caf50;
    color: #4caf50;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.4);
}

.biometrics-action-btn .btn-icon {
    font-size: 18px;
}

.biometrics-action-btn .btn-text {
    font-weight: bold;
}

/* Samples List */
.biometrics-samples-list-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    transition: all 0.3s ease;
    max-height: 300px;
    overflow: hidden;
}

.biometrics-minigame-container:not(.expanded) .biometrics-samples-list-container {
    max-height: 0;
    opacity: 0;
}

.biometrics-samples-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid #444;
    /* border-radius: 6px; */
    font-size: 14px;
    font-weight: bold;
    color: #e74c3c;
}

.samples-count {
    font-size: 12px;
    color: #4caf50;
    background: rgba(76, 175, 80, 0.2);
    padding: 2px 6px;
    /* border-radius: 3px; */
    border: 1px solid #4caf50;
}

.biometrics-samples-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid #333;
    /* border-radius: 6px; */
    max-height: 300px;
}

.biometrics-samples-list::-webkit-scrollbar {
    width: 8px;
}

.biometrics-samples-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    /* border-radius: 4px; */
}

.biometrics-samples-list::-webkit-scrollbar-thumb {
    background: #e74c3c;
    /* border-radius: 4px; */
}

.biometrics-samples-list::-webkit-scrollbar-thumb:hover {
    background: #4caf50;
}

/* Sample Items */
.sample-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #444;
    /* border-radius: 6px; */
    margin-bottom: 6px;
    padding: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sample-item:hover {
    background: rgba(231, 76, 60, 0.1);
    border-color: #e74c3c;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.2);
}

.sample-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 14px;
}

.sample-header strong {
    color: #e0e0e0;
    font-weight: bold;
}

.sample-type {
    font-size: 12px;
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.2);
    padding: 2px 6px;
    /* border-radius: 3px; */
    border: 1px solid #e74c3c;
}

.sample-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.sample-quality {
    font-weight: bold;
    padding: 2px 6px;
    /* border-radius: 3px; */
    border: 1px solid;
}

.sample-quality.quality-perfect {
    color: #4caf50;
    background: rgba(76, 175, 80, 0.2);
    border-color: #4caf50;
}

.sample-quality.quality-excellent {
    color: #8bc34a;
    background: rgba(139, 195, 74, 0.2);
    border-color: #8bc34a;
}

.sample-quality.quality-good {
    color: #ffc107;
    background: rgba(255, 193, 7, 0.2);
    border-color: #ffc107;
}

.sample-quality.quality-fair {
    color: #ff9800;
    background: rgba(255, 152, 0, 0.2);
    border-color: #ff9800;
}

.sample-quality.quality-acceptable {
    color: #ff5722;
    background: rgba(255, 87, 34, 0.2);
    border-color: #ff5722;
}

.sample-quality.quality-poor {
    color: #f44336;
    background: rgba(244, 67, 54, 0.2);
    border-color: #f44336;
}

.sample-date {
    color: #666;
    font-style: italic;
    font-size: 10px;
}

/* Instructions */
.biometrics-scanner-instructions {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid #444;
    /* border-radius: 6px; */
    font-size: 12px;
    line-height: 1.4;
    color: #ccc;
    transition: all 0.3s ease;
}

.biometrics-minigame-container:not(.expanded) .biometrics-scanner-instructions {
    display: none;
}

.instruction-text {
    color: #aaa;
}

.instruction-text strong {
    color: #e74c3c;
}

/* Responsive Design */
@media (max-width: 768px) {
    .biometrics-minigame-container {
        top: 2vh !important;
        right: 2vw !important;
        left: 2vw !important;
        width: 96vw !important;
        max-width: 400px !important;
    }
    
    .biometrics-minigame-container.expanded {
        width: 96vw !important;
        max-width: 500px !important;
    }
    
    .biometrics-scanner-title {
        font-size: 14px;
    }
    
    .biometrics-categories {
        flex-direction: column;
        gap: 5px;
    }
    
    .biometrics-category {
        text-align: center;
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .biometrics-actions {
        flex-direction: column;
    }
    
    .biometrics-action-btn {
        justify-content: center;
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .biometrics-expand-toggle {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
}

/* Animation for new samples */
@keyframes sampleAppear {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.sample-item.new-sample {
    animation: sampleAppear 0.5s ease-out;
}

/* Hover preservation for smooth updates */
.sample-item.hover-preserved {
    background: rgba(231, 76, 60, 0.1);
    border-color: #e74c3c;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.2);
}
