/* ========================================
   Modern IPL Score Predictor - Cricket Theme
   ======================================== */

:root {
    --primary-dark: #0f1419;
    --primary-accent: #ff6b35;
    --secondary-accent: #004e89;
    --success-color: #06a77d;
    --warning-color: #ffa500;
    --text-light: #e8e8e8;
    --text-muted: #999;
    --border-color: #333;
    --card-bg: #1a2332;
    --gradient-primary: linear-gradient(135deg, #004e89 0%, #0a7ea4 100%);
    --gradient-accent: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
}

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

html, body {
    width: 100%;
    height: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0f1419 0%, #1a2a3a 100%);
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ========================================
   HEADER
   ======================================== */

.header {
    background: var(--gradient-primary);
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 78, 137, 0.3);
    border-bottom: 3px solid var(--primary-accent);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.logo i {
    font-size: 2.5rem;
    color: var(--primary-accent);
    animation: pulse 2s infinite;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    letter-spacing: 1px;
}

.tagline {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    margin-top: 0.5rem;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ========================================
   MAIN CONTAINER
   ======================================== */

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero-section {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

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

.hero-content h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.hero-badges {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.badge {
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid var(--primary-accent);
    color: var(--primary-accent);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ========================================
   FORM SECTION
   ======================================== */

.predictor-section {
    animation: fadeInUp 0.8s ease-out;
}

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

.form-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.form-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: white;
    text-align: center;
    font-weight: 700;
}

.predictor-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ========================================
   FORM SECTIONS
   ======================================== */

.form-group-section {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.form-group-section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-accent);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.teams-selection {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.team-selector-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.team-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.team-label i {
    color: var(--primary-accent);
}

.team-logos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
}

.team-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 107, 53, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.team-option:hover {
    border-color: var(--primary-accent);
    background: rgba(255, 107, 53, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 107, 53, 0.2);
}

.team-option img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.team-option:hover img {
    transform: scale(1.1);
}

.team-option span {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
}

.team-option.active {
    border-color: var(--primary-accent);
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.2) 0%, rgba(255, 107, 53, 0.1) 100%);
    box-shadow: 0 0 25px rgba(255, 107, 53, 0.3), inset 0 0 15px rgba(255, 107, 53, 0.1);
}

.team-option.active img {
    transform: scale(1.15) drop-shadow(0 0 10px rgba(255, 107, 53, 0.5));
}

.team-option.active span {
    color: var(--primary-accent);
    font-weight: 800;
}

.selected-team-display {
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--primary-accent);
    border-radius: 8px;
    color: var(--text-muted);
    text-align: center;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.selected-team-display.selected {
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary-accent);
    font-weight: 700;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

/* ========================================
   FORM INPUTS
   ======================================== */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label i {
    color: var(--primary-accent);
}

.form-select,
.form-input {
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.form-select:hover,
.form-input:hover {
    border-color: var(--primary-accent);
    background: rgba(255, 255, 255, 0.08);
}

.form-select:focus,
.form-input:focus {
    outline: none;
    border-color: var(--primary-accent);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.2);
}

.form-select option {
    background: var(--primary-dark);
    color: var(--text-light);
}

/* ========================================
   SUBMIT BUTTON
   ======================================== */

.submit-btn {
    background: var(--gradient-accent);
    border: none;
    color: white;
    padding: 1.1rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    margin-top: 1rem;
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(255, 107, 53, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* ========================================
   RESULT SECTION
   ======================================== */

.result-section {
    animation: fadeInUp 0.8s ease-out;
}

.result-container {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

/* Match Matchup Display */
.match-matchup {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(0, 78, 137, 0.1) 0%, rgba(255, 107, 53, 0.1) 100%);
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.team-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.team-badge img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

.team-badge:hover img {
    transform: scale(1.1);
    filter: drop-shadow(0 8px 25px rgba(255, 107, 53, 0.4));
}

.team-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-light);
    line-height: 1.3;
}

.vs-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--gradient-accent);
    border-radius: 50%;
    color: white;
    font-weight: 800;
    font-size: 1.3rem;
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.3);
}

/* Match Details */
.match-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.detail-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.detail-card:hover {
    border-color: var(--primary-accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.2);
}

.detail-card i {
    font-size: 1.8rem;
    color: var(--primary-accent);
    margin-bottom: 0.5rem;
}

.detail-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.detail-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-light);
}

.result-animation {
    margin-bottom: 2rem;
}

.result-animation i {
    font-size: 4rem;
    color: var(--primary-accent);
    animation: sparkle 1s infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.result-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: white;
    font-weight: 800;
}

.score-card {
    background: var(--gradient-primary);
    border: 2px solid var(--primary-accent);
    border-radius: 15px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 15px 50px rgba(0, 78, 137, 0.3);
}

.score-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.score-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.score-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.score-min,
.score-max {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary-accent);
    text-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.score-separator {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.5);
}

.score-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

/* ========================================
   INFO CARDS
   ======================================== */

.result-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.info-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.info-card:hover {
    border-color: var(--primary-accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.2);
}

.info-card i {
    font-size: 2rem;
    color: var(--primary-accent);
    margin-bottom: 1rem;
}

.info-card h4 {
    font-size: 1.1rem;
    color: white;
    margin-bottom: 0.5rem;
}

.info-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ========================================
   ACTION BUTTONS
   ======================================== */

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-accent);
    color: white;
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(255, 107, 53, 0.4);
}

.btn-secondary {
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary-accent);
    border: 2px solid var(--primary-accent);
}

.btn-secondary:hover {
    background: rgba(255, 107, 53, 0.2);
    transform: translateY(-2px);
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background: linear-gradient(135deg, #000 0%, #0f1419 100%);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    padding: 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.footer-links a {
    color: var(--primary-accent);
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    transform: scale(1.2);
    color: var(--primary-accent);
}

.footer-credit {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .logo h1 {
        font-size: 1.8rem;
    }

    .hero-content h2 {
        font-size: 1.6rem;
    }

    .form-container {
        padding: 1.5rem;
    }

    .teams-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .team-logos-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.8rem;
    }

    .team-option {
        padding: 0.8rem;
    }

    .team-option img {
        width: 50px;
        height: 50px;
    }

    .team-option span {
        font-size: 0.7rem;
    }

    .match-matchup {
        gap: 1rem;
        padding: 1.5rem;
    }

    .team-badge img {
        width: 70px;
        height: 70px;
    }

    .vs-divider {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
    }

    .match-details {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .score-display {
        gap: 1rem;
    }

    .score-min,
    .score-max {
        font-size: 2.5rem;
    }

    .result-info {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 1.5rem 1rem;
    }

    .logo {
        flex-direction: column;
        gap: 0.5rem;
    }

    .logo i {
        font-size: 2rem;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .main-container {
        padding: 1rem;
    }

    .form-container {
        padding: 1rem;
    }

    .form-title {
        font-size: 1.3rem;
    }

    .team-logos-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
    }

    .team-option {
        padding: 0.6rem;
    }

    .team-option img {
        width: 45px;
        height: 45px;
    }

    .team-option span {
        font-size: 0.6rem;
    }

    .match-matchup {
        gap: 0.5rem;
        padding: 1rem;
        flex-wrap: wrap;
    }

    .team-badge {
        gap: 0.5rem;
        flex: 0 0 calc(50% - 0.5rem);
    }

    .team-badge img {
        width: 60px;
        height: 60px;
    }

    .team-name {
        font-size: 0.75rem;
    }

    .vs-divider {
        width: 45px;
        height: 45px;
        font-size: 1rem;
        order: 3;
        flex: 0 0 100%;
    }

    .match-details {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .detail-card {
        padding: 1rem;
    }

    .detail-card i {
        font-size: 1.5rem;
    }

    .detail-label {
        font-size: 0.75rem;
    }

    .detail-value {
        font-size: 1rem;
    }

    .result-title {
        font-size: 1.6rem;
    }

    .score-display {
        flex-direction: column;
        gap: 0.5rem;
    }

    .score-separator {
        transform: rotate(90deg);
    }

    .hero-badges {
        gap: 0.7rem;
    }

    .badge {
        font-size: 0.75rem;
        padding: 0.4rem 1rem;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    body {
        background: white;
        color: black;
    }

    .header,
    .footer,
    .action-buttons {
        display: none;
    }

    .score-card {
        border: 2px solid black;
        background: white;
        color: black;
    }

    .score-min,
    .score-max {
        color: black;
    }
}
