/* NFL Confidence Pools Platform - Main CSS */

/* Root Variables */
:root {
    --primary-color: #1a365d;
    --secondary-color: #38a169;
    --success-color: #48bb78;
    --warning-color: #ed8936;
    --danger-color: #e53e3e;
    --info-color: #3182ce;
    --light-color: #f7fafc;
    --dark-color: #2d3748;
    --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Global Styles */
body {
    font-family: var(--font-family);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1030;
    padding: 8px 0;
}

.mobile-bottom-nav .nav-link {
    color: #718096;
    padding: 5px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-bottom-nav .nav-link i {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.mobile-bottom-nav .nav-link span {
    font-size: 0.75rem;
    font-weight: 500;
}

.mobile-bottom-nav .nav-link.active {
    color: var(--primary-color);
}

.mobile-bottom-nav .nav-link.active::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 0 0 3px 3px;
}

/* Badge Dot for Mobile Nav */
.badge-dot {
    position: absolute;
    top: 5px;
    right: 35%;
    width: 8px;
    height: 8px;
    background: var(--danger-color);
    border-radius: 50%;
    border: 2px solid white;
}

/* Mobile Content Spacing */
.mb-mobile-nav {
    padding-bottom: 80px !important;
}

@media (min-width: 992px) {
    .mb-mobile-nav {
        padding-bottom: 0 !important;
    }
}

/* Enhanced Navbar Badges */
.navbar-nav .badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    vertical-align: top;
}

/* Active Nav Indicator */
.navbar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Custom Bootstrap Overrides */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #2c5282;
    border-color: #2c5282;
}

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

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

/* Toast Notifications */
.toast-container {
    z-index: 1060;
}

.toast {
    min-width: 300px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.toast-body {
    font-weight: 500;
}

/* Connection Status */
#connection-status {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    z-index: 1050;
    transition: all 0.3s ease;
}

#connection-status.connected {
    background-color: #48bb78;
    box-shadow: 0 0 10px rgba(72, 187, 120, 0.5);
}

#connection-status.disconnected {
    background-color: #e53e3e;
    box-shadow: 0 0 10px rgba(229, 62, 62, 0.5);
    animation: pulse 2s infinite;
}

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

/* Offline Banner */
#offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #e53e3e;
    color: white;
    text-align: center;
    padding: 8px 16px;
    font-weight: 500;
    z-index: 1040;
    display: none;
}

/* Navigation */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

/* Landing Page Specific */
.landing-page .hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2b6cb0 100%);
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cards */
.card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

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

.card-header {
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
}

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

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
}

.alert-success {
    background-color: #f0fff4;
    color: #22543d;
}

.alert-danger {
    background-color: #fed7d7;
    color: #c53030;
}

.alert-warning {
    background-color: #fefcbf;
    color: #744210;
}

.alert-info {
    background-color: #ebf8ff;
    color: #2c5282;
}

/* Forms */
.form-control {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(26, 54, 93, 0.25);
}

.form-select {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.input-group-text {
    background-color: #f7fafc;
    border-color: #e2e8f0;
}

/* Authentication Pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.auth-page .card {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: none;
}

/* Dashboard */
.dashboard-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
}

.dashboard-stats {
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

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

/* Enhanced Mobile Touch Targets */
@media (max-width: 768px) {
    /* Ensure all interactive elements meet 44px minimum touch target */
    .btn, .form-control, .form-select, .nav-link, .dropdown-item {
        min-height: 44px;
        min-width: 44px;
    }
    
    .btn-sm {
        min-height: 40px;
        min-width: 40px;
        font-size: 0.9rem;
    }
    
    /* Improved spacing for mobile */
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .hero-section {
        min-height: 60vh !important;
    }
    
    /* Mobile Auth Form Improvements */
    .auth-page {
        padding: 1rem 0.75rem;
        min-height: auto;
        background: #f8f9fa;
    }
    
    .auth-container {
        max-width: 100%;
        margin: 0;
        padding: 1.5rem;
    }
    
    .auth-card {
        box-shadow: none;
        border: none;
        background: white;
        border-radius: 12px;
        margin: 0.5rem 0;
    }
    
    .auth-title {
        font-size: 1.5rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .form-control-lg {
        font-size: 1rem;
        padding: 0.75rem 1rem;
        min-height: 48px;
    }
    
    .input-group-text {
        min-width: 48px;
        justify-content: center;
    }
    
    .btn-lg {
        padding: 0.8rem 1.25rem;
        font-size: 1.1rem;
        min-height: 48px;
        border-radius: 8px;
    }
    
    /* Better mobile form spacing */
    .mb-4 {
        margin-bottom: 1.5rem !important;
    }
    
    .mb-3 {
        margin-bottom: 1.25rem !important;
    }
    
    /* Improve mobile join code display */
    .alert {
        padding: 1rem;
        font-size: 0.95rem;
        border-radius: 8px;
    }
    
    .badge {
        font-size: 0.9rem;
        padding: 0.4em 0.8em;
    }
    
    /* Mobile-friendly password toggle */
    .password-toggle {
        min-width: 48px;
        border-left: none;
    }
    
    /* Better mobile form validation feedback */
    .invalid-feedback {
        font-size: 0.875rem;
        margin-top: 0.5rem;
        line-height: 1.4;
    }
    
    /* Improve form text readability */
    .form-text {
        font-size: 0.85rem;
        line-height: 1.4;
        margin-top: 0.5rem;
    }
        text-align: center;
        padding: 2rem 0;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1.1rem;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 0.65rem 1.25rem;
        min-height: 48px;
    }
    
    /* Better form spacing */
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    /* Card improvements */
    .card {
        margin-bottom: 1rem;
        border-radius: 12px;
    }
    
    .card-body {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding: 0 0.5rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .card {
        margin-bottom: 1rem;
        border-radius: 8px;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .btn-group-vertical .btn {
        margin-bottom: 0.5rem;
    }
    
    /* Improved mobile navigation */
    .mobile-bottom-nav .nav-link {
        padding: 8px 4px;
        min-height: 56px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .mobile-bottom-nav .nav-link i {
        font-size: 1.3rem;
        margin-bottom: 4px;
    }
    
    .mobile-bottom-nav .nav-link span {
        font-size: 0.7rem;
        font-weight: 600;
        white-space: nowrap;
    }
}

/* Extra narrow screens (320px and below) */
@media (max-width: 320px) {
    .container-fluid {
        padding: 0 0.25rem;
    }
    
    .btn {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }
    
    .btn-sm {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
    
    .card-body {
        padding: 0.5rem;
    }
    
    .mobile-bottom-nav .nav-link span {
        font-size: 0.65rem;
    }
    
    .mobile-bottom-nav .nav-link i {
        font-size: 1.2rem;
    }
}

/* Utilities */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2b6cb0 100%);
}

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

.shadow-custom {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a202c;
        --text-color: #f7fafc;
        --card-bg: #2d3748;
    }
}

/* Animation utilities */
.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 { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Print styles */
@media print {
    .navbar, .footer, .btn {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}