/**
 * Main styles for Cricket Auction System
 * IPL-inspired design with blues and golds
 */

:root {
    --ipl-blue: #004ba0;
    --ipl-light-blue: #1976d2;
    --ipl-gold: #f9a825;
    --ipl-light-gold: #ffd54f;
    --dark-blue: #003366;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #616161;
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    padding-bottom: 70px; /* Space for footer */
}

a {
    text-decoration: none;
}

.container {
    max-width: 1200px;
}

/* Custom Navbar */
.navbar-dark.bg-primary {
    background-color: var(--ipl-blue) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
    color: white !important;
}

.navbar-brand i {
    color: var(--ipl-gold);
}

.nav-link {
    font-weight: 500;
}

.nav-link.active {
    border-bottom: 2px solid var(--ipl-gold);
}

/* Card Styling */
.card {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    border: none;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.card-header {
    font-weight: 600;
    padding: 0.8rem 1.25rem;
}

.card-header.bg-primary {
    background-color: var(--ipl-blue) !important;
}

.card-header.bg-dark {
    background-color: var(--dark-blue) !important;
}

.card-footer {
    background-color: rgba(0, 0, 0, 0.03);
    padding: 0.75rem 1.25rem;
}

/* Custom Buttons */
.btn-primary {
    background-color: var(--ipl-blue);
    border-color: var(--ipl-blue);
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--ipl-light-blue);
    border-color: var(--ipl-light-blue);
}

.btn-success {
    background-color: #2e7d32;
    border-color: #2e7d32;
}

.btn-warning {
    background-color: var(--ipl-gold);
    border-color: var(--ipl-gold);
}

.btn-outline-primary {
    color: var(--ipl-blue);
    border-color: var(--ipl-blue);
}

.btn-outline-primary:hover {
    background-color: var(--ipl-blue);
    border-color: var(--ipl-blue);
    color: white;
}

/* Footer Style */
footer {
    background-color: var(--dark-blue) !important;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer h5 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

footer a.text-white-50:hover {
    color: var(--ipl-light-gold) !important;
    text-decoration: none;
}

/* Hero Section */
.jumbotron {
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--ipl-blue) 100%);
    margin-bottom: 2rem;
    padding: 3rem 0;
    border-radius: 0.5rem;
}

.jumbotron h1 {
    font-weight: 700;
    color: white;
}

.jumbotron p {
    color: rgba(255, 255, 255, 0.9);
}

.jumbotron img {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Stats Cards */
.card.bg-primary, .card.bg-success, .card.bg-info, .card.bg-warning {
    transition: transform 0.3s;
}

.card.bg-primary:hover, .card.bg-success:hover, .card.bg-info:hover, .card.bg-warning:hover {
    transform: translateY(-5px);
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    color: var(--dark-blue);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 75, 160, 0.05);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.4em 0.6em;
}

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

.badge.bg-danger {
    background-color: #d32f2f !important;
}

.badge.bg-success {
    background-color: #2e7d32 !important;
}

.badge.bg-warning {
    background-color: var(--ipl-gold) !important;
}

.badge.bg-info {
    background-color: #0288d1 !important;
}

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

.alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.alert-danger {
    background-color: #ffebee;
    color: #c62828;
}

.alert-warning {
    background-color: #fff8e1;
    color: #f57f17;
}

.alert-info {
    background-color: #e1f5fe;
    color: #0277bd;
}

/* Forms */
.form-control:focus {
    border-color: var(--ipl-light-blue);
    box-shadow: 0 0 0 0.2rem rgba(0, 75, 160, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.input-group-text {
    background-color: var(--medium-gray);
    border: 1px solid #ced4da;
}

/* Player and Team Cards */
.player-card, .team-card {
    transition: transform 0.2s;
    margin-bottom: 1.5rem;
}

.player-card:hover, .team-card:hover {
    transform: translateY(-5px);
}

.player-card img, .team-card img {
    object-fit: cover;
    height: 180px;
}

.player-role-badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

/* Progress Bars */
.progress {
    height: 10px;
    border-radius: 5px;
    background-color: var(--medium-gray);
}

.progress-bar {
    background-color: var(--ipl-blue);
}

.progress-bar.bg-success {
    background-color: #2e7d32 !important;
}

/* Custom Circle Elements */
.rounded-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
}

/* Team Search */
.team-search-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.team-search-container .form-control {
    padding-left: 40px;
    border-radius: 20px;
}

.team-search-container i {
    position: absolute;
    left: 15px;
    top: 13px;
    color: var(--dark-gray);
}

/* Login & Register Forms */
.auth-form {
    max-width: 500px;
    margin: 0 auto;
}

.auth-form .card {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .jumbotron {
        text-align: center;
    }
    
    .jumbotron img {
        margin-top: 1.5rem;
        max-height: 200px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.85rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
}

/* Custom Cricket Ball Icon for List Items */
ul.cricket-list {
    list-style: none;
    padding-left: 0;
}

ul.cricket-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
}

ul.cricket-list li::before {
    content: "🏏";
    position: absolute;
    left: 0;
    top: 0;
}

/* Scrollable containers */
.scrollable-container {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.scrollable-container::-webkit-scrollbar {
    width: 6px;
}

.scrollable-container::-webkit-scrollbar-track {
    background: var(--light-gray);
    border-radius: 3px;
}

.scrollable-container::-webkit-scrollbar-thumb {
    background-color: var(--dark-gray);
    border-radius: 3px;
}

/* Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--medium-gray);
    border-top: 5px solid var(--ipl-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animation for new items */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.toast {
    min-width: 250px;
}

/* Contextual tooltips */
.info-tooltip {
    cursor: help;
    color: var(--ipl-blue);
}

/* Image with overlay */
.img-overlay-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.img-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    padding: 15px 10px 5px 10px;
    color: white;
    transition: all 0.3s;
}

.img-overlay h5 {
    margin-bottom: 5px;
}

.img-overlay-container:hover .img-overlay {
    padding-bottom: 15px;
}
