/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Colors for Index Page */
    --index-bg: linear-gradient(135deg, #0d0a1b 0%, #1c0b33 50%, #3a0847 100%);
    --card-border-radius: 12px;
    
    /* Colors for Dashboard Page */
    --dash-bg: linear-gradient(135deg, #5c7480 0%, #3e4f58 100%);
    --card-header-bg: #2b2e35;
    
    /* General colors */
    --text-light: #f8f9fa;
    --text-dark: #212529;
    --primary: #6c5ce7;
    --secondary: #00cec9;
    --accent: #ff7675;
    --shadow: 0 8px 30px rgba(0,0,0,0.15);
    --shadow-hover: 0 15px 40px rgba(0,0,0,0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    min-height: 100vh;
    line-height: 1.5;
    background-color: #f0f2f5;
}

body.index-view {
    background: var(--index-bg);
}

body.dashboard-view {
    background: var(--dash-bg);
}

/* Header & Navigation */
header {
    background: rgba(15, 15, 26, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
}

.logo-text span {
    color: var(--secondary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: var(--secondary);
}

.nav-phone {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 20px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.3s;
}

.nav-phone:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Hero Section */
.hero {
    padding: 60px 20px 40px 20px;
    text-align: center;
    color: #fff;
    max-width: 900px;
    margin: 0 auto;
}

.hero-subtitle {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 10px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.hero-description {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* Index / Auctions List Grid */
.auctions-container {
    max-width: 1200px;
    margin: 0 auto 80px auto;
    padding: 0 20px;
}

.auctions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* Card Design */
.auction-card {
    background: #fff;
    border-radius: var(--card-border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
}

.auction-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.auction-image-container {
    height: 220px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid #eee;
    position: relative;
}

.auction-logo {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.5s;
}

.auction-card:hover .auction-logo {
    transform: scale(1.05);
}

.auction-details {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: center;
}

.auction-name {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1a1a2e;
    line-height: 1.4;
    text-transform: uppercase;
}

.auction-sport {
    font-size: 13px;
    font-weight: 700;
    color: #4b5d67;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.auction-location {
    font-size: 13px;
    color: #757575;
    margin-bottom: 6px;
}

.auction-date {
    font-size: 12px;
    color: #9e9e9e;
    margin-top: auto;
}

/* Dashboard Styles */
.dashboard-header {
    text-align: center;
    color: #fff;
    padding: 40px 20px 20px 20px;
}

.dashboard-title {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.dashboard-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.dashboard-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.dashboard-back-btn, .btn-report {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #2b2e35;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
}

.dashboard-back-btn:hover, .btn-report:hover {
    background: #1e2025;
}

/* Dashboard Grid */
.dashboard-container {
    max-width: 1200px;
    margin: 30px auto 80px auto;
    padding: 0 20px;
}

.dashboard-grid {
    display: grid;
    gap: 25px;
}

.dashboard-grid.row-1 {
    grid-template-columns: repeat(3, 1fr);
}

.dashboard-grid.row-2 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1024px) {
    .dashboard-grid.row-1 {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-grid.row-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-grid.row-1, .dashboard-grid.row-2 {
        grid-template-columns: 1fr;
    }
}

.dash-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.dash-card-header {
    background: var(--card-header-bg);
    color: #fff;
    padding: 12px 20px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.dash-card-body {
    padding: 25px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

.dash-card-text {
    font-size: 14px;
    color: #757575;
    margin-bottom: 15px;
}

.dash-card-number {
    font-size: 36px;
    font-weight: 800;
    color: #1a252f;
    margin-bottom: 20px;
    line-height: 1;
}

.badge-group {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.dash-badge {
    background: #1b6ca8;
    color: #fff;
    padding: 8px 18px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 18px;
    min-width: 50px;
    text-align: center;
}

.dash-card-btn-group {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: center;
}

.dash-btn {
    background: #2b2e35;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.3s;
    text-decoration: none;
}

.dash-btn:hover {
    background: #1e2025;
}

/* Modal and Detail Views */
.overlay-view {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 2000;
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.overlay-content {
    background: #fff;
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.overlay-header {
    background: #2b2e35;
    color: #fff;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.overlay-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
}

.overlay-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.overlay-body {
    padding: 25px;
    overflow-y: auto;
    flex-grow: 1;
}

/* Detail Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 14px;
}

.detail-table th, .detail-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.detail-table th {
    background-color: #f5f6fa;
    font-weight: 600;
    color: #333;
}

.detail-table tbody tr:hover {
    background-color: #fcfcfd;
}

/* Team Card Detail Grid */
.teams-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.team-detail-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.team-detail-header {
    background: #f1f2f6;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    border-bottom: 1px solid #e0e0e0;
}

.team-detail-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.team-detail-body {
    padding: 15px;
    flex-grow: 1;
}

.team-detail-points {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    background: #eee;
    padding: 3px 6px;
    border-radius: 4px;
    display: inline-block;
}

.team-players-list {
    margin-top: 10px;
}

.team-player-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 5px 0;
    border-bottom: 1px dashed #eee;
}

.team-player-row:last-child {
    border-bottom: none;
}

/* Player Cards Grid */
.players-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.player-detail-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    background: #fff;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.player-photo-container {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 10px auto;
    border: 3px solid #eee;
}

.player-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-name {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.player-no {
    font-size: 11px;
    color: #888;
    margin-bottom: 8px;
}

.player-meta {
    font-size: 12px;
    background: #f1f2f6;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
    font-weight: 600;
}

.player-points {
    margin-top: auto;
    font-size: 13px;
    font-weight: 700;
    color: #2e7d32;
}

/* Sponsors styling */
.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.sponsor-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.sponsor-logo {
    max-width: 100px;
    max-height: 80px;
    object-fit: contain;
    margin-bottom: 10px;
}

.sponsor-name {
    font-weight: 600;
    font-size: 13px;
}

/* Footer Section */
footer {
    background: #0f0f1a;
    color: rgba(255, 255, 255, 0.6);
    padding: 30px 20px;
    text-align: center;
    font-size: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p span {
    color: var(--secondary);
    font-weight: 700;
}

/* Search bar inside modal */
.search-container {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
}

.search-input {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.badge-status {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-sold { background-color: #c8e6c9; color: #256029; }
.badge-unsold { background-color: #ffcdd2; color: #c63737; }
.badge-icon { background-color: #bbdefb; color: #1565c0; }
.badge-pending { background-color: #ffe0b2; color: #805b00; }
.badge-token { background-color: #e0f7fa; color: #006064; }

.modal-view-toggle {
    margin-bottom: 15px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.toggle-btn {
    background: #eee;
    color: #333;
    border: 1px solid #ccc;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.toggle-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Report Table Styling */
.report-section {
    margin-bottom: 25px;
}
.report-section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1a252f;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
}

/* Live Auction Panel */
.live-auction-panel {
    text-align: center;
    padding: 30px;
}
.live-badge {
    background: #ff7675;
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    display: inline-block;
    margin-bottom: 15px;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

.live-player-card {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    max-width: 400px;
    margin: 0 auto;
}

/* Premium Live Bidding Styles */
.live-bidding-container {
    display: flex;
    gap: 30px;
    background-color: #0b0e27;
    background-image: radial-gradient(circle at center, #1b204e 0%, #070919 100%);
    padding: 35px;
    border-radius: 12px;
    min-height: 550px;
    color: #fff;
    flex-wrap: wrap;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.live-player-section {
    flex: 1 1 340px;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.live-teams-section {
    flex: 2 2 450px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    align-content: flex-start;
}

.premium-player-card {
    position: relative;
    width: 380px;
    min-height: 520px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.85) 100%);
    border: 2px solid rgba(0, 240, 255, 0.3);
    box-shadow: 0 20px 50px rgba(0,0,0,0.8),
                0 0 25px rgba(0, 240, 255, 0.15),
                inset 0 0 20px rgba(0, 240, 255, 0.05);
    border-radius: 24px;
    padding: 35px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    backdrop-filter: blur(15px);
    overflow: hidden;
}

.premium-player-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #00f0ff, #74b9ff, #a29bfe, #fd79a8, #00f0ff);
    background-size: 200% auto;
    animation: borderGlow 4s linear infinite;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
}

@keyframes borderGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.premium-player-photo-outer {
    position: relative;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    overflow: visible;
    margin-top: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-player-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #00f0ff;
    background: transparent;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
    mix-blend-mode: multiply;
}

.premium-player-stamp {
    position: absolute;
    top: 20px;
    right: -20px;
    width: 75px;
    height: 75px;
    transform: rotate(15deg);
    z-index: 10;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
    animation: stampAnimation 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes stampAnimation {
    0% { transform: scale(3) rotate(0deg); opacity: 0; }
    100% { transform: scale(1) rotate(15deg); opacity: 1; }
}

.premium-player-name {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    text-transform: uppercase;
    margin-bottom: 15px;
    text-align: center;
    width: 100%;
    letter-spacing: 0.5px;
    line-height: 1.3;
    white-space: normal;
    overflow: visible;
}

.premium-player-details {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    align-items: center;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.premium-player-details div {
    display: inline-block;
    background: rgba(0, 0, 0, 0.45);
    padding: 4px 16px;
    border-radius: 20px;
    margin-bottom: 2px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.premium-player-details span.label {
    color: #00f0ff;
    margin-right: 4px;
}

.premium-player-divider {
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.3), transparent);
    margin: 15px 0 15px 0;
}

.premium-player-bid-info {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.premium-player-bid-team {
    font-size: 15px;
    font-weight: 700;
    color: #ffd700;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    letter-spacing: 0.5px;
}

.premium-player-bid-value {
    font-size: 26px;
    font-weight: 800;
    color: #00f0ff;
    margin-top: 2px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.9);
}

/* Premium Team Cards */
.premium-team-card {
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 10px 15px;
    gap: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.premium-team-card-color-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
}

.premium-team-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.15);
    padding: 4px;
    box-shadow: 0 0 10px rgba(0,0,0,0.4);
}

.premium-team-color-block {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}

.premium-team-info {
    flex-grow: 1;
    min-width: 0;
}

.premium-team-name {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.premium-team-stats {
    font-size: 12px;
    color: #cbd5e1;
    line-height: 1.4;
    text-transform: uppercase;
    font-weight: 700;
}

.premium-team-stats span {
    color: #fff;
}

/* Section Headers & Badges for Index Page */
.auctions-section {
    margin-bottom: 60px;
}

.section-header-container {
    margin-bottom: 25px;
}

.section-header-title {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 8px;
    display: inline-block;
}

.section-header-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--secondary);
    border-radius: 2px;
}

.auction-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 2;
}

.auction-badge.badge-deleted {
    background-color: #ff7675;
    color: #fff;
}

.auction-card.card-deleted {
    cursor: default;
    opacity: 0.85;
}

.auction-card.card-deleted:hover {
    transform: none;
    box-shadow: var(--shadow);
}

.auction-card.card-deleted .auction-logo {
    transform: none !important;
}

