/* Custom CSS for Star Job Academy */

/* Font Configuration */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Prevent layout shift from font loading */
    font-display: swap;
}

/* Offline Mode Styles */
.offline-mode * {
    animation: none !important;
    transition: none !important;
}

/* Offline indicator */
.offline-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #dc3545;
    color: white;
    text-align: center;
    padding: 8px;
    z-index: 9999;
    font-size: 14px;
}

/* Ensure smooth transitions when CSS loads */
.css-loading * {
    transition: none !important;
    animation: none !important;
}

.css-loaded * {
    transition: all 0.3s ease;
}

/* Prevent FOUC (Flash of Unstyled Content) */
html {
    visibility: visible;
    opacity: 1;
}

/* Reserve space for images to prevent layout shift */
img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

img[width][height] {
    height: auto;
}

/* Ensure navbar stays fixed height during load */
.navbar {
    min-height: 56px;
}

.navbar-brand img, .site-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

/* Prevent card layout shift */
.card {
    min-height: 100px;
}

/* Bangla Font Support */
.bangla-text, 
[lang="bn"], 
html[lang="bn"] body {
    font-family: 'Noto Sans Bengali', 'Segoe UI', Arial, sans-serif !important;
    font-display: swap;
}

/* Main Layout */
.main-content {
    min-height: calc(100vh - 200px);
}

/* Navigation Enhancements */
.navbar-brand {
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar.bg-primary .navbar-brand,
.navbar.bg-primary .nav-link,
.navbar.bg-primary .nav-link i,
.navbar.bg-primary .navbar-brand i,
.navbar.bg-primary .dropdown-toggle {
    color: #ffffff !important;
}

.navbar.bg-primary .nav-link:hover,
.navbar.bg-primary .navbar-brand:hover {
    color: #f8f9fa !important;
}

.navbar-nav .nav-link:hover {
    transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    border: none;
}

/* Feature Cards */
.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 10px;
    background: white;
    margin-bottom: 2rem;
}

.feature-icon {
    font-size: 3rem;
    color: #007bff;
    margin-bottom: 1rem;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border: none;
    padding: 10px 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
}

.btn-success {
    background: linear-gradient(45deg, #28a745, #20c997);
    border: none;
}

.btn-danger {
    background: linear-gradient(45deg, #dc3545, #c82333);
    border: none;
}

/* Forms */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Typing Area */
.typing-area {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 20px;
    min-height: 300px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.6;
}

.typing-area:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Bangla Typing Support */
.typing-area.bangla {
    font-family: 'Noto Sans Bengali', 'SolaimanLipi', 'Kalpurush', monospace;
    font-size: 18px;
}

/* Statistics Cards */
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    display: block;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Tables */
.table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.table thead th {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    border: none;
    font-weight: 600;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 10px;
    padding: 15px 20px;
}

.alert-success {
    background: linear-gradient(45deg, #d4edda, #c3e6cb);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(45deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

.alert-info {
    background: linear-gradient(45deg, #d1ecf1, #bee5eb);
    color: #0c5460;
}

/* Language Toggle */
.language-toggle {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1000;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 50px 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* 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-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Status Badges */
.status-pending {
    background: #ffc107;
    color: #212529;
}

.status-approved {
    background: #28a745;
    color: white;
}

.status-banned {
    background: #dc3545;
    color: white;
}

/* Dashboard Sidebar */
.dashboard-sidebar {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    min-height: calc(100vh - 76px);
    color: white;
}

.dashboard-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 20px;
    border-radius: 8px;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.dashboard-sidebar .nav-link:hover,
.dashboard-sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Language Dropdown Styles */
.dropdown-item.active {
    background-color: #007bff;
    color: white;
    font-weight: 600;
}

.dropdown-item.active:hover {
    background-color: #0056b3;
    color: white;
}

/* Results Modal Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.results-modal .modal-dialog {
    max-width: 95%;
    width: 95%;
}

/* Landscape modal orientation */
.results-modal .modal-landscape {
    max-width: 90vw;
    width: 90vw;
    max-height: 80vh;
    height: auto;
}

.results-modal .modal-landscape .modal-content {
    height: auto;
    max-height: 80vh;
    overflow-y: auto;
}

.results-modal .modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.results-modal .modal-header {
    border-radius: 15px 15px 0 0;
    padding: 20px 30px;
}

.results-modal .modal-body {
    padding: 30px;
}

.results-modal .card {
    border-radius: 10px;
    transition: all 0.3s ease;
}

.results-modal .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.results-modal .display-1 {
    animation: pulse 2s infinite;
}

.results-modal .badge {
    padding: 8px 16px;
    border-radius: 20px;
}

.results-modal .table {
    border-radius: 8px;
    overflow: hidden;
}

.results-modal .table th {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    border: none;
    font-weight: 600;
}

.results-modal .alert {
    border-radius: 10px;
    border: none;
}

/* Print Styles */
@media print {
    .navbar, .footer, .btn, .no-print {
        display: none !important;
    }
    
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }
}
