/* ===================================
   Cric Hubo - Fantasy Cricket Website
   Main Stylesheet
   =================================== */

/* CSS Variables for Theme Colors */
:root {
    --primary-color: #1a472a;
    --secondary-color: #2d7a4d;
    --accent-color: #ff6b35;
    --text-dark: #1a1a1a;
    --text-light: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark: #1a1a1a;
    --border-color: #ddd;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.15);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #fff;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.header {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    gap: 10px;
}

.logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-menu a {
    color: var(--text-light);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--accent-color);
}

.nav-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.lang-switcher {
    background-color: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: var(--text-light);
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.lang-switcher:hover {
    background-color: rgba(255,255,255,0.2);
}

.btn {
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--text-light);
}

.btn-primary:hover {
    background-color: #ff5722;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
}

.btn-secondary:hover {
    background-color: var(--text-light);
    color: var(--primary-color);
}

.btn-success {
    background-color: var(--success-color);
    color: var(--text-light);
}

.btn-success:hover {
    background-color: #218838;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    transition: all 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(26, 71, 42, 0.85), rgba(26, 71, 42, 0.85)), url('../images/hero-bg.jpg') center/cover no-repeat;
    color: var(--text-light);
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Features Section */
.features {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: var(--primary-color);
}

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

.feature-card {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Matches Section */
.matches {
    padding: 80px 0;
}

.matches-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 30px;
    background-color: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.tab-btn.active {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
}

.match-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.match-card:hover {
    box-shadow: var(--shadow-lg);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.match-status {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-live {
    background-color: var(--danger-color);
    color: var(--text-light);
    animation: pulse 2s infinite;
}

.status-upcoming {
    background-color: var(--warning-color);
    color: var(--text-dark);
}

.status-completed {
    background-color: var(--success-color);
    color: var(--text-light);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.match-teams {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 20px;
}

.team {
    text-align: center;
    flex: 1;
}

.team-name {
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 5px;
}

.team-score {
    font-size: 24px;
    color: var(--primary-color);
    font-weight: bold;
}

.vs {
    font-size: 20px;
    font-weight: bold;
    color: var(--accent-color);
}

.match-info {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.match-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Form Styles */
.form-container {
    max-width: 500px;
    margin: 50px auto;
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-message {
    color: var(--danger-color);
    font-size: 14px;
    margin-top: 5px;
}

.success-message {
    color: var(--success-color);
    font-size: 14px;
    margin-top: 5px;
}

/* Dashboard */
.dashboard {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: calc(100vh - 70px);
}

.sidebar {
    background-color: var(--bg-light);
    padding: 30px 20px;
    border-right: 1px solid var(--border-color);
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-menu a {
    padding: 12px 15px;
    border-radius: 5px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.main-content {
    padding: 30px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-info h3 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-info p {
    color: #666;
}

.stat-icon {
    width: 50px;
    height: 50px;
    opacity: 0.3;
}

/* Team Builder */
.player-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.player-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.player-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.player-card.selected {
    border-color: var(--success-color);
    background-color: #f0f9f4;
}

.player-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 15px;
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
}

.player-role {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--accent-color);
    color: var(--text-light);
    border-radius: 15px;
    font-size: 12px;
    margin-top: 10px;
}

.player-points {
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 10px;
}

/* Leaderboard */
.leaderboard-table {
    width: 100%;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.leaderboard-table table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.leaderboard-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.leaderboard-table tr:hover {
    background-color: var(--bg-light);
}

.rank-badge {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    font-weight: bold;
    color: var(--text-light);
}

.rank-1 { background-color: #ffd700; color: var(--text-dark) !important; }
.rank-2 { background-color: #c0c0c0; color: var(--text-dark) !important; }
.rank-3 { background-color: #cd7f32; }

/* Footer */
.footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: 50px 0 20px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 20px;
    color: var(--accent-color);
}

.footer-section ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.disclaimer {
    background-color: var(--warning-color);
    color: var(--text-dark);
    padding: 15px;
    text-align: center;
    font-weight: 600;
    border-radius: 5px;
    margin: 20px 0;
}

/* Age Verification Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    max-width: 500px;
    text-align: center;
}

.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--primary-color);
        flex-direction: column;
        padding: 30px;
        transition: left 0.3s;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: none;
    }
    
    .features-grid,
    .player-grid {
        grid-template-columns: 1fr;
    }
    
    .match-teams {
        flex-direction: column;
        gap: 20px;
    }
    
    .vs {
        transform: rotate(90deg);
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none; }
