body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
}

.annotation-form {
    margin-top: 20px;
}

.nav-tabs {
    margin-bottom: 20px;
}

.card {
    margin-bottom: 20px;
}

/* Brand and navbar styles */
.navbar-brand {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 1.5rem;
}

.navbar-brand img {
    height: 40px;
    margin-right: 12px;
    filter: brightness(0) invert(1); /* Make logo white for dark navbar */
    transition: opacity 0.3s ease;
}

.navbar-brand img:hover {
    opacity: 0.9;
}

/* Logo fallback */
.navbar-brand img:not([src]), .navbar-brand img[src=""] {
    display: none;
}

.navbar {
    background: linear-gradient(135deg, #0d47a1 0%, #1976d2 50%, #42a5f5 100%) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Page header styles */
.page-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    border: 1px solid #e9ecef;
}

.page-title {
    color: #1976d2;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: #6c757d;
    font-size: 1.1rem;
}

/* Navigation styles */
.navigation-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
}

.exercise-badge {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    border: none;
    box-shadow: 0 3px 6px rgba(25, 118, 210, 0.3);
    font-weight: 600;
}

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

.nav-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.nav-btn:disabled {
    opacity: 0.4;
}

.btn-outline-primary {
    border-color: #1976d2;
    color: #1976d2;
}

.btn-outline-primary:hover {
    background-color: #1976d2;
    border-color: #1976d2;
}

/* Keyboard navigation hint */
.keyboard-hint {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.95) 0%, rgba(21, 101, 192, 0.95) 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85em;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.keyboard-hint.show {
    opacity: 1;
}

/* Card and form enhancements */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 1px solid #e9ecef;
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 0.25rem rgba(25, 118, 210, 0.1);
}

.form-check-input:checked {
    background-color: #1976d2;
    border-color: #1976d2;
}

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

.btn-primary {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(25, 118, 210, 0.3);
}

/* Breadcrumb enhancements */
.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-weight: 600;
    color: #1976d2;
}

.breadcrumb-item a {
    color: #1976d2;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #1565c0;
    text-decoration: underline;
}

/* Accordion and dropdown enhancements */
.accordion-button {
    border-radius: 8px;
    font-weight: 500;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(25, 118, 210, 0.1);
    color: #1976d2;
}

.dropdown-item.active {
    background-color: #1976d2;
}

/* Footer styles */
.site-footer {
    background: linear-gradient(135deg, #2c659e 0%, #4d90dd 100%);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

.footer-brand {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-logo {
    height: 32px;
    margin-right: 12px;
    filter: brightness(0) invert(1);
}

.footer-brand h5 {
    margin: 0;
    font-weight: 600;
    color: white;
}

.footer-title {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.2);
    margin: 2rem 0 1rem;
}

.copyright {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-size: 0.9rem;
}

/* Ensure footer sticks to bottom */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

.container.mt-4 {
    flex: 1;
}

/* Logo fallback for footer */
.footer-logo:not([src]), .footer-logo[src=""] {
    display: none;
}

/* Responsive footer */
@media (max-width: 768px) {
    .site-footer {
        padding: 2rem 0 1rem;
    }

    .footer-brand {
        justify-content: center;
        text-align: center;
    }

    .footer-title {
        text-align: center;
        margin-top: 1.5rem;
    }

    .footer-links {
        text-align: center;
    }

    .text-md-end {
        text-align: center !important;
        margin-top: 1rem;
    }
}

.admin-card {
    transition: all 0.3s ease;
    background: #fff;
}

.admin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12) !important;
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.admin-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(13, 71, 161, 0.1) 0%, rgba(25, 118, 210, 0.1) 100%);
    border-radius: 12px;
    margin: 0 auto;
}

.card-title {
    color: #212529;
    font-size: 1.1rem;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1) !important;
}

.page-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.page-title {
    color: #0d47a1;
    font-weight: 700;
}

.page-subtitle {
    color: #6c757d;
    font-size: 1rem;
}

.btn-rounded-3 {
    border-radius: 50px;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, #0d47a1 0%, #1976d2 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0d47a1 0%, #1976d2 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(13, 71, 161, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #2e7d32 0%, #43a047 100%);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #2e7d32 0%, #43a047 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(46, 125, 50, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #f57f17 0%, #fbc02d 100%);
    border: none;
    color: #000;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #f57f17 0%, #fbc02d 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(245, 127, 23, 0.3);
    color: #000;
}
