html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation styles */
.navbar {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 60px;
}

.navbar-brand {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
}

.navbar-brand a {
    text-decoration: none;
    color: #333;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    color: #333;
}

.nav-link.active {
    color: #333;
    font-weight: 500;
}

.heart-icon {
    color: #dc3545;
    font-size: 1rem;
}

.api-icon {
    color: #007bff;
    font-size: 1rem;
}

/* Main content */
.container {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-content {
    padding: 5px 0;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 400;
    color: #333;
    margin-bottom: 15px;
}

.page-subtitle {
    font-size: 1.1rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Analysis container - two column layout */
.analysis-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
    align-items: start;
}

.upload-section, .preview-section {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.section-title {
    background: #f8f9fa;
    padding: 5px 10px;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #e0e0e0;
}

.upload-card {
    padding: 16px;
}
.preview-card {
    padding: 3px;
}

/* File input styling */
.file-input-group {
    margin-bottom: 20px;
}

.file-label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.file-input-container {
    position: relative;
    display: block;
    width: 100%;
    margin-bottom: 12px;
}

.file-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #666;
    cursor: pointer;
    font-size: 0.9rem;
}

.file-input:hover,
.file-input:focus {
    border-color: #007bff;
    outline: none;
}

.file-name {
    display: none;
}

/* Button group */
.button-group {
    display: flex;
    gap: 8px;
}

.btn-analyze, .btn-reset {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.btn-analyze {
    background-color: #007bff;
    color: white;
    flex: 1;
}

.btn-analyze:hover:not(:disabled) {
    background-color: #0056b3;
}

.btn-analyze:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-reset {
    background-color: #6c757d;
    color: white;
    flex: 0 0 auto;
}

.btn-reset:hover {
    background-color: #545b62;
}

.btn-icon {
    font-size: 0.9rem;
}

/* Image preview */
.image-preview-container {
    position: relative;
}

.image-preview {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px dashed #ddd;
    overflow: hidden;
    position: relative;
    cursor: grab;
}

.image-preview.zoomed {
    cursor: move;
}

.preview-placeholder {
    text-align: center;
    color: #999;
    font-size: 0.9rem;
}

.preview-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 8px;
}

.preview-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
    transition: transform 0.3s ease;
    transform-origin: center center;
    cursor: zoom-in;
}

.preview-image.zoomed {
    cursor: grab;
}

.preview-image.zoomed:active {
    cursor: grabbing;
}

/* Zoom controls */
.zoom-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.zoom-btn {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.zoom-btn:hover {
    background: #0056b3;
}

.zoom-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.zoom-level {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    min-width: 45px;
    text-align: center;
}

/* Success message */
.success-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 5px 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.success-icon {
    font-weight: bold;
    font-size: 1rem;
}

/* Results section */
.results-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    margin-bottom: 5px;
    margin-top: 20px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.results-header {
    background: #f8d7da;
    border-bottom: 1px solid #f5c6cb;
    padding: 5px 10px;
}

.results-title {
    color: #721c24;
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.results-subtitle {
    color: #721c24;
    margin: 0;
    font-size: 0.9rem;
}

.violations-detected {
    padding: 16px;
}

.violations-detected h4 {
    margin-bottom: 16px;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
}

/* Violation cards */
.violation-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.violation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.violation-icon {
    margin-right: 6px;
}

.violation-type {
    font-weight: 600;
    color: #333;
    flex: 1;
    font-size: 0.95rem;
}

.confidence-score {
    background: #ffc107;
    color: #212529;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 600;
}

.violation-description {
    color: #666;
    margin: 8px 0;
    line-height: 1.4;
    font-size: 0.9rem;
}

.violation-class {
    margin-top: 8px;
}

.class-label {
    background: #17a2b8;
    color: white;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Analysis summary */
.analysis-summary {
    background: #f8f9fa;
    padding: 10px;
    border-top: 1px solid #e0e0e0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.summary-item {
    text-align: center;
}

.summary-label {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 4px;
}

.summary-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.status-badge.violations-found {
    background-color: #dc3545;
    color: white;
}

.status-badge.no-violations {
    background-color: #28a745;
    color: white;
}

.status-badge.compliant {
    background-color: #28a745;
    color: white;
}

.status-badge.analysis-error {
    background-color: #ffc107;
    color: #212529;
}

/* No violations content area */
.no-violations-content {
    padding: 20px;
}

.no-violations-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-weight: 500;
    margin-bottom: 0;
}

.no-violations-message .success-icon {
    font-size: 1.2rem;
    color: #28a745;
    font-weight: bold;
}

.no-violations-header {
    background: linear-gradient(135deg, #d4edda, #c3e6cb) !important;
    border-bottom: 2px solid #28a745 !important;
    border-radius: 8px 8px 0 0 !important;
}

.no-violations-header .results-title {
    color: #155724 !important;
    font-weight: 600;
}

.no-violations-header .results-subtitle {
    color: #155724 !important;
    font-weight: 500;
}

/* How It Works section */
.how-it-works {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
}

.how-it-works .section-title {
    background: none;
    padding: 0 0 0px 0;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.step {
    text-align: center;
}

.step-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
}

.step-content h4 {
    color: #333;
    margin-bottom: 8px;
    font-size: 1rem;
    font-weight: 600;
}

.step-content p {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Footer */
.site-footer {
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    margin-top: auto;
}

.privacy-notice {
    background: #cce7f0;
    color: #0c5460;
    padding: 15px 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.privacy-icon {
    font-size: 1.1rem;
}

.footer-copyright {
    text-align: center;
    padding: 15px 20px;
    color: #666;
    font-size: 0.9rem;
}

.footer-copyright a {
    color: #007bff;
    text-decoration: none;
}

.footer-copyright a:hover {
    text-decoration: underline;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utility classes */
.d-none {
    display: none !important;
}

.text-center {
    text-align: center;
}

.no-violations-text {
    color: #28a745;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.error-text {
    color: #dc3545;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Responsive design */
@media (max-width: 768px) {
    .navbar-container {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
    }
    
    .navbar-nav {
        margin-top: 10px;
        gap: 20px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .analysis-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .steps-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .analysis-summary {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn-reset {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .main-content {
        padding: 20px 0;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .upload-card, .preview-card {
        padding: 15px;
    }
} 