/* Base Reset & Variables */
:root {
    --primary-color: #1a237e;
    /* Deep Blue */
    --secondary-color: #00e676;
    /* Neon Green */
    --accent-color: #ffAB00;
    /* Amber Gold */
    --text-color: #ffffff;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --font-main: 'Poppins', sans-serif;
    --font-heading: 'Poppins', sans-serif;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Typography map */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: var(--secondary-color);
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 230, 118, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 230, 118, 0.6);
}

.btn-danger {
    background: #ff1744;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 23, 68, 0.4);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 23, 68, 0.6);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
    border-radius: 4px;
    /* Slightly less rounded for small buttons looks better often, or keep 50px */
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

.section-padding {
    padding: 80px 0;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 2rem;
    letter-spacing: -2px;
}

.dot {
    color: var(--secondary-color);
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    opacity: 0.8;
}

.nav-link:hover {
    opacity: 1;
    color: var(--secondary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.email-link {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Hero Section */
.hero {
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(26, 35, 126, 0.4) 0%, rgba(18, 18, 18, 1) 70%);
}

.hero h2 {
    font-size: 4rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .hero h2 {
        font-size: 2.5rem;
    }
}

.highlight {
    color: transparent;
    background: linear-gradient(to right, var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
}

/* Image Grid */
.section-title {
    font-size: 2.5rem;
    margin-bottom: 60px;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.grid-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.grid-item:hover img {
    transform: scale(1.1);
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: white;
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition);
}

.grid-item:hover .overlay {
    transform: translateY(0);
    opacity: 1;
}

.overlay h4 {
    color: var(--secondary-color);
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: #0a0a0a;
    color: #888;
    margin-top: 40px;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: white;
    margin-bottom: 20px;
}

.social-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-links a:hover {
    color: var(--secondary-color);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.5;
    transition: var(--transition);
}

.close-btn:hover {
    opacity: 1;
    color: var(--secondary-color);
}

.modal-header {
    margin-bottom: 30px;
    text-align: center;
}

.modal-header h3 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #fdfcfcfa;
}


/* Register Card */
.register-card {
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    max-width: 800px;
    margin: 0 auto;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #e0e0e0;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: white;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.2);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* Form Groups Spacing */
.form-group {
    margin-bottom: 25px;
}

.file-input {
    padding: 12px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

input[type="file"]::file-selector-button {
    background: var(--secondary-color);
    color: #000;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin-right: 15px;
    transition: transform 0.2s;
}

input[type="file"]::file-selector-button:hover {
    transform: scale(1.05);
}

.payment-section {
    background: rgba(255, 255, 255, 0.02);
    padding: 30px;
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    margin-top: 30px;
}

.qr-code {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    border: 4px solid white;
    padding: 5px;
    background: white;
}

/* Contact Email in Footer */
.contact-email a {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.contact-email {
    margin-bottom: 20px;
}

/* Admin Button */
.admin-btn {
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-btn:hover {
    background: var(--secondary-color);
    color: #000;
}

/* Image Thumbnails */
.table-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--secondary-color);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.table-img:hover {
    transform: scale(2.5);
    z-index: 10;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.table-signature {
    width: 80px;
    height: 40px;
    object-fit: contain;
    background: white;
    padding: 2px;
    border-radius: 4px;
}

/* ADMIN DASHBOARD STYLES */
.admin-section {
    min-height: 80vh;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.table-container {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
    /* Force scroll on small screens */
}

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-table th {
    background: rgba(0, 0, 0, 0.3);
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.admin-table td {
    font-size: 0.95rem;
    color: #e0e0e0;
}

.admin-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.admin-table a {
    color: var(--secondary-color);
    text-decoration: underline;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
}

/* Role Badges */
.badge.batsman {
    background: rgba(255, 171, 0, 0.2);
    color: #ffab00;
}

.badge.bowler {
    background: rgba(0, 230, 118, 0.2);
    color: #00e676;
}

.badge.all-rounder {
    background: rgba(41, 121, 255, 0.2);
    color: #2979ff;
}

.badge.wicketkeeper {
    background: rgba(255, 64, 129, 0.2);
    color: #ff4081;
}

.no-data {
    text-align: center;
    padding: 40px;
    font-size: 1.2rem;
    color: #888;
}

.modal-content {
    text-align: center;
}

.admin-input {
    margin: 20px 0;
    padding: 12px;
    width: 100%;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    color: white;
}

/* Authentication Styles */
.password-container {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.password-container input.admin-input {
    margin: 0;
    padding-right: 40px;
    /* Make space for eye icon */
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10;
    user-select: none;
    color: #ccc;
}

.auth-links a {
    text-decoration: none;
    transition: var(--transition);
}

.auth-links a:hover {
    text-decoration: underline;
}