/* ===== ANALYZER PAGE SPECIFIC STYLES ===== */

/* Analyzer Header */
.analyzer-header {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 0 0 40px 40px;
    margin-bottom: 3rem;
}

.analyzer-header-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 992px) {
    .analyzer-header-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.analyzer-intro .section-label {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.analyzer-intro h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.analyzer-intro .subtitle {
    font-size: 1.1rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.analyzer-features {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 50px;
    border: 1px solid var(--gray-200);
    font-size: 0.9rem;
    color: var(--gray-700);
}

.feature-badge i {
    color: var(--primary-color);
}

.analyzer-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 1rem;
    border-left: 4px solid var(--primary-color);
}

.stat-card i {
    font-size: 2rem;
    color: var(--primary-color);
}

.stat-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
    color: var(--gray-900);
}

.stat-card p {
    font-size: 0.9rem;
    color: var(--gray-600);
}

/* Main Analyzer Grid */
.analyzer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

@media (max-width: 992px) {
    .analyzer-grid {
        grid-template-columns: 1fr;
    }
}

.analyzer-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.analyzer-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.card-header i {
    font-size: 1.5rem;
}

.card-header h3 {
    margin: 0;
    color: white;
    font-size: 1.3rem;
}

.card-body {
    padding: 2rem;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    background: var(--gray-50);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 1.5rem;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.upload-area i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-area h4 {
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.upload-area p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.file-hint {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 1rem;
}

/* File Preview */
.file-preview {
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    background: var(--gray-50);
    margin-bottom: 1.5rem;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.preview-header h4 {
    margin: 0;
    color: var(--gray-800);
}

.preview-header button {
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
}

.file-preview img {
    width: 100%;
    max-height: 250px;
    object-fit: contain;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    background: white;
    border: 1px solid var(--gray-300);
}

.preview-info {
    text-align: center;
    color: var(--gray-600);
    font-size: 0.9rem;
    margin: 0;
}

/* Camera Switch */
.camera-switch-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.camera-switch-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.camera-switch-btn:hover {
    transform: rotate(90deg);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

#cameraLabel {
    font-weight: 600;
    color: var(--gray-700);
}

/* Video Container */
.video-container {
    position: relative;
    width: 100%;
    background: var(--dark-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
    aspect-ratio: 4/3;
    border: 3px solid var(--gray-200);
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

.focus-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 70%;
    border: 2px dashed rgba(255, 255, 255, 0.5);
    border-radius: 10px;
}

.recording-indicator {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    display: none;
}

.recording-indicator.active {
    display: flex;
}

.pulse {
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Camera Controls */
.camera-controls {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 576px) {
    .camera-controls {
        grid-template-columns: 1fr;
    }
}

.camera-controls .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem;
}

/* Result Cards */
.result-card {
    background: var(--gray-50);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
    margin-top: 1.5rem;
    display: none;
}

.result-card.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Info Cards */
.info-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-md);
}

.info-card h4 {
    margin-bottom: 1rem;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card li {
    padding: 0.3rem 0;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card li:before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.warning-card {
    border-left-color: var(--warning-color);
}

.warning-card h4 {
    color: var(--warning-color);
}

/* Instructions */
.instructions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.instruction-step {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    position: relative;
}

.step-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.instruction-step h3 {
    margin-bottom: 1rem;
    color: var(--gray-800);
}

.instruction-step p {
    color: var(--gray-600);
    line-height: 1.6;
}