/* Custom styles for PreGraded */

/* Remove any unwanted spacing */
body {
    margin: 0;
    padding: 0;
}

.navbar {
    margin-bottom: 0 !important;
}

/* Logo styling */
.navbar-brand img {
    max-height: 40px;
    width: auto;
    display: inline-block;
    /* Force browser refresh */
}

footer img {
    max-height: 32px;
    width: auto;
    display: inline-block;
    /* Force browser refresh */
}

/* Modern Design Styles */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.min-vh-75 {
    min-height: 75vh;
}

.hero-section {
    position: relative;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.stat-item h3 {
    font-size: 2rem;
}

.demo-dots {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.card-demo {
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.3s ease;
}

.card-demo:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0,0,0,.175) !important;
}

.icon-circle {
    width: 60px;
    height: 60px;
}

.progress {
    border-radius: 10px;
}

.progress-bar {
    border-radius: 10px;
}

.grading-breakdown {
    border: 1px solid rgba(0,0,0,.125);
}

.accordion-button {
    border-radius: 12px !important;
    border: none;
    box-shadow: none;
}

.accordion-button:not(.collapsed) {
    background-color: #f8f9fa;
    color: #000;
}

.accordion-button:focus {
    border: none;
    box-shadow: none;
}

.accordion-item {
    border: 1px solid rgba(0,0,0,.125);
}

.btn-lg.rounded-pill {
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.5px;
}

/* Enhanced button styles */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.2);
}

.btn-outline-dark:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.1);
}

/* Card scanning outline styles */
.camera-wrapper {
    position: relative;
    display: inline-block;
}

.card-outline {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    height: 400px;
    pointer-events: none;
    z-index: 10;
}

.outline-border {
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    background: rgba(0, 123, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.3);
    animation: pulse 2s infinite;
}

.corner-guides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid #007bff;
    background: rgba(255, 255, 255, 0.9);
}

.corner.top-left {
    top: -3px;
    left: -3px;
    border-right: none;
    border-bottom: none;
    border-radius: 8px 0 0 0;
}

.corner.top-right {
    top: -3px;
    right: -3px;
    border-left: none;
    border-bottom: none;
    border-radius: 0 8px 0 0;
}

.corner.bottom-left {
    bottom: -3px;
    left: -3px;
    border-right: none;
    border-top: none;
    border-radius: 0 0 0 8px;
}

.corner.bottom-right {
    bottom: -3px;
    right: -3px;
    border-left: none;
    border-top: none;
    border-radius: 0 0 8px 0;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 123, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 123, 255, 0.6);
    }
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .card-outline {
        width: 240px;
        height: 340px;
    }
}

/* Card hover effects */
.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Progress bar animations */
.progress-bar {
    transition: width 1s ease-in-out;
}

/* File upload styling */
.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Grade badge styling */
.badge.fs-1 {
    font-size: 3rem !important;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
}

/* Mobile responsiveness for stats cards */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .badge.fs-1 {
        font-size: 2rem !important;
        padding: 0.75rem 1rem;
    }
}

/* Loading spinner custom styling */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Image preview styling */
#imagePreview img {
    border: 2px solid var(--bs-border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Custom button hover effects */
.btn {
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Table row hover effects */
.table-hover tbody tr:hover {
    background-color: var(--bs-gray-800);
}

/* Pricing card special styling */
.card.border-primary {
    position: relative;
    overflow: hidden;
}

.card.border-primary::before {
    content: "MOST POPULAR";
    position: absolute;
    top: 20px;
    right: -30px;
    background: var(--bs-warning);
    color: var(--bs-dark);
    padding: 5px 40px;
    font-size: 0.75rem;
    font-weight: bold;
    transform: rotate(45deg);
    z-index: 1;
}

/* Hero section styling */
.display-4 {
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-info));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

/* Footer styling */
footer {
    border-top: 1px solid var(--bs-border-color);
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bs-gray-900);
}

::-webkit-scrollbar-thumb {
    background: var(--bs-gray-600);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-gray-500);
}

/* Ensure proper spacing for icons */
.fas, .far, .fab {
    width: 1.2em;
    text-align: center;
}

/* Custom alert styling */
.alert {
    border: none;
    border-radius: 0.75rem;
}

/* Profile image in navbar */
.navbar .rounded-circle {
    border: 2px solid var(--bs-border-color);
}

/* Custom dropdown styling */
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border-radius: 0.5rem;
}

/* Grade description styling */
.text-primary {
    font-weight: 600;
}

/* Ensure consistent card heights */
.h-100 {
    min-height: 100%;
}

/* Custom spacing utilities */
.py-6 {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* Camera functionality styles */
.camera-container {
    position: relative;
    background: var(--bs-dark);
    border-radius: 0.5rem;
    padding: 1rem;
    min-height: 300px;
}

#camera, #canvas {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    border: 2px solid var(--bs-border-color);
}

/* Toggle button group styling */
.btn-group .btn-check:checked + .btn {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

/* Camera error styling */
#cameraError {
    margin: 2rem auto;
    max-width: 400px;
}

/* Responsive camera layout */
@media (max-width: 768px) {
    .camera-container {
        padding: 0.5rem;
        min-height: 250px;
    }
    
    #camera, #canvas {
        max-height: 300px;
        width: 100%;
        object-fit: cover;
    }
}

/* Mobile-first responsive design */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Dashboard Enhancements */
.dashboard-hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.stat-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.08);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15)!important;
}

.scan-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.08);
}

.scan-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

/* Scan Interface Enhancements */
.scan-hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.scan-interface {
    border: 1px solid rgba(0,0,0,0.08);
}

.method-toggle .btn-group {
    border-radius: 50px;
    overflow: hidden;
}

.method-toggle .btn {
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.method-toggle .btn:focus,
.method-toggle .btn:active {
    box-shadow: none;
}

.method-toggle .btn-check:checked + .btn {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border-color: transparent;
}

/* Empty State */
.empty-state .icon-circle {
    border: 1px solid rgba(0,0,0,0.08);
}

/* Feature card text contrast fixes */
.feature-card h4,
.feature-card p,
.feature-card li {
    color: #333 !important;
}

.feature-card .text-dark {
    color: #212529 !important;
}

/* Section title contrast fixes */
.features-section h2 {
    color: #212529 !important;
}

.features-section .text-dark {
    color: #212529 !important;
}

/* Technology section text contrast fixes */
.technology-section h2,
.technology-section h5,
.technology-section p,
.technology-section span,
.technology-section .text-dark {
    color: #212529 !important;
}

.technology-section .text-muted {
    color: #6c757d !important;
}

.tech-item h5 {
    color: #0d6efd !important;
}

.tech-item p {
    color: #212529 !important;
}

/* Force dark text in technology section */
#technology * {
    color: #212529 !important;
}

#technology .text-primary {
    color: #0d6efd !important;
}

/* Footer styling - ensure white text on dark background */
footer.bg-dark,
footer.bg-dark * {
    color: #ffffff !important;
}

footer.bg-dark .text-muted {
    color: #adb5bd !important;
}
}
