/* AI PrepX Custom Styles */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0,0,0,0.125);
    font-weight: 600;
}

.btn {
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #1a252f;
    border-color: #1a252f;
    transform: translateY(-2px);
}

.form-control {
    border-radius: 5px;
    border: 1px solid #ced4da;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);
}

.alert {
    border-radius: 5px;
    border: none;
}

.interview-type-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.interview-type-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.interview-type-card .card-body {
    padding: 2rem;
}

.interview-type-card i {
    transition: all 0.3s ease;
}

.interview-type-card:hover i {
    transform: scale(1.1);
}

.navbar-nav .dropdown-menu {
    border: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 5px;
}

.navbar-nav .dropdown-item {
    transition: all 0.3s ease;
}

.navbar-nav .dropdown-item:hover {
    background-color: var(--light-color);
    transform: translateX(5px);
}

.stats-card {
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: scale(1.05);
}

.footer {
    background-color: var(--light-color);
    color: var(--dark-color);
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Authentication pages */
.auth-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    max-width: 400px;
    width: 100%;
}

.auth-header {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 10px 10px 0 0;
}

.auth-body {
    padding: 2rem;
}

.input-group .btn {
    border-left: none;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .interview-type-card .card-body {
        padding: 1.5rem;
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Dashboard specific styles */
.dashboard-stats .card {
    border-radius: 15px;
    margin-bottom: 1rem;
}

.dashboard-stats .card-body {
    padding: 1.5rem;
}

.dashboard-stats i {
    margin-bottom: 0.5rem;
}

.recent-activity-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.recent-activity-item:last-child {
    border-bottom: none;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

/* Modal enhancements */
.modal-content {
    border-radius: 10px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid #eee;
    background-color: var(--light-color);
}

.modal-footer {
    border-top: 1px solid #eee;
    background-color: var(--light-color);
}

/* Interview setup form */
#interview-setup-form .form-select,
#interview-setup-form .form-control {
    margin-bottom: 1rem;
}

/* Success/Error states */
.is-valid {
    border-color: var(--success-color);
}

.is-invalid {
    border-color: var(--danger-color);
}

.invalid-feedback {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Utility classes */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.shadow-sm {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.shadow {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
}

.shadow-lg {
    box-shadow: 0 8px 16px rgba(0,0,0,0.15) !important;
}

/* Connection Quality Indicator */
.connection-indicator {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.connection-indicator.good {
    background-color: #10b981;
    color: white;
}

.connection-indicator.fair {
    background-color: #f59e0b;
    color: white;
}

.connection-indicator.poor {
    background-color: #ef4444;
    color: white;
}

.connection-indicator.reconnecting {
    background-color: #3b82f6;
    color: white;
    animation: pulse 1.5s infinite;
}

.connection-indicator.disconnected {
    background-color: #fbbf24;
    color: #1f2937;
}

.connection-indicator.failed {
    background-color: #dc2626;
    color: white;
}

.connection-indicator.unknown {
    background-color: #6b7280;
    color: white;
}

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

/* Media Device Selection Styles */
.device-select-container {
    background-color: #f9fafb;
    border-radius: 8px;
    padding: 1rem;
}

.mic-level-meter {
    background-color: #e5e7eb;
    border-radius: 9999px;
    height: 8px;
    overflow: hidden;
    position: relative;
}

.mic-level-bar {
    height: 100%;
    transition: width 100ms ease-out;
    border-radius: 9999px;
}

.device-status {
    background-color: #f3f4f6;
    border-radius: 6px;
    padding: 0.75rem;
    font-size: 0.875rem;
}

.device-status.success {
    background-color: #d1fae5;
    color: #065f46;
}

.device-status.error {
    background-color: #fee2e2;
    color: #991b1b;
}

.device-status.warning {
    background-color: #fef3c7;
    color: #92400e;
}