/* Custom styles for Pushbike Live Scoring System - Mobile Optimized */

:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --accent-color: #e74c3c;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --gold-color: #f1c40f;
    --silver-color: #bdc3c7;
    --bronze-color: #d35400;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar Styles */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), #2980b9) !important;
    box-shadow: var(--shadow);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
    display: flex;
    align-items: center;
}

.navbar-brand i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    margin: 0 5px;
    border-radius: 4px;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white !important;
}

/* Main Container */
.container, .container-fluid {
    padding: 15px;
    max-width: 100%;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    color: white;
    padding: 3rem 0;
    text-align: center;
    border-radius: 0 0 20px 20px;
    margin-bottom: 2rem;
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-section p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Event and Category Cards */
.event-card, .category-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: white;
}

.event-card:hover, .category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.event-card .card-body, .category-card .card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.event-card .card-title, .category-card .card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
}

.event-card .card-text, .category-card .card-text {
    color: #666;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.event-card .card-footer, .category-card .card-footer {
    background-color: transparent;
    border-top: none;
    padding: 1rem 1.5rem;
}

/* Buttons */
.btn {
    border-radius: 50px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-outline-primary {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--secondary-color), #27ae60);
}

.btn-success:hover {
    background: linear-gradient(135deg, #27ae60, #229954);
}

/* Live Score Section */
.live-score-header {
    background: linear-gradient(135deg, var(--dark-color), #34495e);
    color: white;
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.live-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: var(--accent-color);
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 1.5s infinite;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.7);
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

.last-updated {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

/* Score Table */
.score-card {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background-color: white;
}

.score-table {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.score-table thead th {
    background: linear-gradient(135deg, var(--dark-color), #34495e);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.score-table tbody tr {
    transition: var(--transition);
}

.score-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.score-table tbody tr:hover {
    background-color: #e9f7fe;
}

.score-table td {
    padding: 1rem;
    vertical-align: middle;
    border: none;
}

/* Rank Badges */
.rank-1 { 
    background-color: rgba(241, 196, 15, 0.2);
    font-weight: 700;
    color: #d68910;
}

.rank-2 { 
    background-color: rgba(189, 195, 199, 0.2);
    font-weight: 700;
    color: #5d6d7e;
}

.rank-3 { 
    background-color: rgba(211, 84, 0, 0.2);
    font-weight: 700;
    color: #a04000;
}

/* Twibbon Button */
.twibbon-btn {
    border-radius: 50px;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
    background-color: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

/* Admin Dashboard */
.dashboard-card {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

.dashboard-card .card-body {
    padding: 1.5rem;
}

.dashboard-card .card-header {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    color: white;
    font-weight: 600;
    border: none;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--dark-color), #34495e);
    color: white;
    padding: 2rem 0;
    margin-top: auto;
    border-radius: 20px 20px 0 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .event-card, .category-card {
        margin-bottom: 1.5rem;
    }
    
    .score-table {
        font-size: 0.8rem;
    }
    
    .score-table th, .score-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .twibbon-btn {
        font-size: 0.7rem;
        padding: 0.3rem 0.8rem;
    }
    
    .btn {
        padding: 0.5rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .container, .container-fluid {
        padding: 10px;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .event-card .card-title, .category-card .card-title {
        font-size: 1.1rem;
    }
    
    .score-table {
        font-size: 0.75rem;
    }
    
    .score-table th, .score-table td {
        padding: 0.5rem 0.3rem;
    }
    
    .table-responsive {
        border-radius: 10px;
        overflow: hidden;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility Classes */
.shadow-custom {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.rounded-custom {
    border-radius: 15px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}