/* ===================================
   CricScore Pro - Custom Stylesheet
   =================================== */

:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --secondary: #5f6368;
    --success: #34a853;
    --danger: #ea4335;
    --warning: #fbbc04;
    --info: #4285f4;
    --dark: #202124;
    --light: #f8f9fa;
    --gradient-primary: linear-gradient(135deg, #1a73e8 0%, #6c5ce7 100%);
    --gradient-dark: linear-gradient(135deg, #2d3436 0%, #000000 100%);
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
    --radius: 12px;
    --radius-sm: 8px;
}

* {
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #f5f7fa;
    min-height: 100vh;
}

/* ===== Navbar ===== */
.navbar {
    box-shadow: var(--shadow);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

/* ===== Cards ===== */
.card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius) var(--radius) 0 0 !important;
    font-weight: 600;
    padding: 1rem 1.25rem;
}

/* ===== Buttons ===== */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(26,115,232,0.4);
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

/* ===== Forms ===== */
.form-control, .form-select {
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
}

.form-label {
    font-weight: 500;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

/* ===== Tables ===== */
.table {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table thead th {
    background: var(--dark);
    color: white;
    font-weight: 600;
    border: none;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: rgba(26,115,232,0.05);
}

/* ===== Dashboard Stats ===== */
.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateX(5px);
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
}

.stat-card .stat-label {
    color: var(--secondary);
    font-size: 0.9rem;
}

/* ===== Live Score ===== */
.live-score-card {
    background: var(--gradient-dark);
    color: white;
    border-radius: var(--radius);
    padding: 2rem;
}

.live-badge {
    background: var(--danger);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.score-big {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.team-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    background: white;
}

.team-logo-sm {
    width: 40px;
    height: 40px;
}

.player-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.player-photo-lg {
    width: 120px;
    height: 120px;
}

/* ===== Points Table ===== */
.points-table .position {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.points-table .position.top {
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
    color: #333;
}

/* ===== Sidebar (Admin) ===== */
.admin-sidebar {
    background: var(--gradient-dark);
    min-height: 100vh;
    padding: 1.5rem;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.25rem;
    transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.admin-sidebar .nav-link i {
    width: 24px;
}

/* ===== Image Preview ===== */
.image-preview {
    width: 150px;
    height: 150px;
    border: 3px dashed #ddd;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-preview:hover {
    border-color: var(--primary);
    background: rgba(26,115,232,0.05);
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

/* ===== Login Page ===== */
.login-page {
    min-height: 100vh;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

.login-card .logo {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* ===== Loading Spinner ===== */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .score-big {
        font-size: 2rem;
    }
    
    .stat-card .stat-value {
        font-size: 1.5rem;
    }
    
    .team-logo {
        width: 45px;
        height: 45px;
    }
}

/* ===== Utilities ===== */
.bg-gradient-primary {
    background: var(--gradient-primary) !important;
}

.bg-gradient-dark {
    background: var(--gradient-dark) !important;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.border-primary-bold {
    border-left: 4px solid var(--primary) !important;
}

.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}
