
/* Base Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Performance Optimizations */
html {
    scroll-behavior: smooth;
}

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

/* Cricket-themed background with subtle pattern */
body {
    background-color: #0a0a0a;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(163, 8, 10, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(209, 175, 77, 0.1) 0%, transparent 20%),
        linear-gradient(to bottom, #0a0a0a, #111);
    color: #fff;
    opacity: 1;
    position: relative;
    overflow-x: hidden;
}

/* Cricket pitch lines animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, 
            transparent 49.5%, 
            rgba(209, 175, 77, 0.1) 49.5%, 
            rgba(209, 175, 77, 0.1) 50.5%, 
            transparent 50.5%
        ),
        linear-gradient(0deg, 
            transparent 49.5%, 
            rgba(209, 175, 77, 0.1) 49.5%, 
            rgba(209, 175, 77, 0.1) 50.5%, 
            transparent 50.5%
        );
    background-size: 40px 40px;
    opacity: 0.3;
    pointer-events: none;
    z-index: -1;
}

body.loaded {
    opacity: 1;
}

/* Prevents FOUC */
html.js-enabled body {
    opacity: 1;
}

header {
    background: linear-gradient(135deg, #a3080a 0%, #8a0000 100%);
    text-align: center;
    padding: 10px 20px 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

/* Glitter container is now created and styled by JavaScript */

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.logo-container {
    max-width: 300px;
    margin: 0 auto 20px;
    animation: pulse 3s infinite;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
    transform-origin: center;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

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

.logo {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    }
    50% { 
        transform: scale(1.05);
        animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/* Animated cricket elements */
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M50 10L60 40H90L70 60L80 90L50 75L20 90L30 60L10 40H40L50 10Z" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></svg>'),
        url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></svg>');
    background-size: 100px 100px, 120px 120px;
    opacity: 0.5;
    animation: float 20s linear infinite;
}

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(5deg); }
}

@import url('https://fonts.googleapis.com/css2?family=Anton&display=swap');

.hero h1 {
    font-size: 3.5rem;
    margin: 15px 0 20px 0;
    color: #fff;
    font-family: 'Anton', sans-serif;
    text-shadow: 2px 2px 0 #8a0000;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    padding: 0 20px 5px;
    line-height: 1.2;
}

.hero h1 .team-name {
    color: #f5d76e;
    text-shadow: 2px 2px 0 #a3080a;
    position: relative;
    display: inline-block;
    animation: pump 1.5s ease-in-out infinite;
    font-size: 1.3em;
    margin: 0 5px;
}

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

.hero p {
    font-size: 1.8rem;
    margin: 15px 0 30px;
    font-family: 'Arial', sans-serif;
    color: #fff;
    text-shadow: 1px 1px 0 #8a0000;
    letter-spacing: 0.5px;
    position: relative;
    display: block;
    padding: 5px 0;
}

/* Responsive Typography */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.3rem;
    }
}

.btn-primary {
    background: linear-gradient(45deg, #d1af4d, #f5d76e);
    color: #000;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(209, 175, 77, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #f5d76e, #d1af4d);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(209, 175, 77, 0.6);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(209, 175, 77, 0.6);
}

section {
    padding: 80px 20px 60px; /* Increased top padding to make room for the divider */
    text-align: center;
    position: relative;
    margin-top: 30px; /* Add space above the section for the divider */
}

/* Section divider with cricket stumps */
section::before {
    content: '';
    position: absolute;
    top: -15px; /* Position it slightly above the section */
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 40px;
    background: url("data:image/svg+xml,%3Csvg width='80' height='40' viewBox='0 0 80 40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='25' y='0' width='30' height='5' rx='2.5' fill='%23d1af4d'/%3E%3Crect x='20' y='5' width='5' height='25' rx='2' fill='%23d1af4d'/%3E%3Crect x='37.5' y='5' width='5' height='25' rx='2' fill='%23d1af4d'/%3E%3Crect x='55' y='5' width='5' height='25' rx='2' fill='%23d1af4d'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    z-index: 2;
}

/* Add a background to the section to ensure the divider is visible */
section {
    background-color: #0a0a0a;
}

#social-feed h2, #merch h2 {
    font-size: 2rem;
    color: #d1af4d;
    margin-bottom: 20px;
}

/* Merchandise CTA Section */
.merch-cta {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
    text-align: center;
    background: rgba(34, 34, 34, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 2px solid #a3080a;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.merch-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #a3080a, #d1af4d, #a3080a);
    background-size: 200% 100%;
    animation: gradient 3s ease infinite;
}

.merch-cta .cta-content {
    padding: 30px 20px;
    position: relative;
    z-index: 1;
}

.merch-cta h2 {
    color: #d1af4d;
    font-size: 2.2rem;
    margin-bottom: 20px;
    font-family: 'Anton', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.merch-cta p {
    color: #fff;
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.merch-cta .btn-primary {
    display: inline-block;
    margin-top: 10px;
    font-size: 1.1rem;
    padding: 15px 40px;
    border-radius: 50px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.merch-cta .btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(209, 175, 77, 0.4);
}

.btn-secondary {
    background: linear-gradient(45deg, #a3080a, #d62b1f);
    color: #fff;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(163, 8, 10, 0.4);
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #d62b1f, #a3080a);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(163, 8, 10, 0.6);
}

.btn-secondary:hover::before {
    opacity: 1;
}

.btn-secondary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(163, 8, 10, 0.6);
}

/* Responsive Typography */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
        letter-spacing: 2px;
        padding: 0 15px 5px;
    }
    
    .hero p {
        font-size: 1.5rem;
        margin: 15px 0 30px;
        padding: 3px 15px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
        letter-spacing: 1px;
    }
    
    .hero p {
        font-size: 1.3rem;
        margin: 10px 0 25px;
        padding: 2px 10px;
    }
}

/* Loading States */
.loading {
    position: relative;
    min-height: 300px;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
}

.skeleton-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #222 25%, #2a2a2a 37%, #222 63%);
    background-size: 400% 100%;
    animation: loading 1.4s ease infinite;
    border-radius: 8px;
}

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

/* Image loading state */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 992px) {
    .logo-container {
        max-width: 250px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .logo-container {
        max-width: 200px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
    
    #social-embed iframe {
        height: 400px;
    }
}

@media (max-width: 576px) {
    .logo-container {
        max-width: 180px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .logo-container {
        max-width: 150px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        max-width: 300px;
        margin: 0 auto;
    }
    
    #social-embed iframe {
        height: 300px;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none;
    }
    
    body {
        background-color: white;
        color: black;
    }
    
    a {
        text-decoration: underline;
        color: blue;
    }
}

/* Cache Control */
.cache-control {
    display: none;
}

/* Footer */
footer {
    background: linear-gradient(to right, #0a0a0a, #1a1a1a, #0a0a0a);
    color: #aaa;
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
    position: relative;
    border-top: 1px solid rgba(209, 175, 77, 0.2);
}

footer::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 30px;
    background: url('data:image/svg+xml;utf8,<svg width="100" height="30" viewBox="0 0 100 30" xmlns="http://www.w3.org/2000/svg"><path d="M0 30L10 15L0 0H100L90 15L100 30H0Z" fill="%23a3080a"/></svg>') no-repeat center;
    background-size: contain;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
}

footer small {
    display: block;
    margin-top: 10px;
    font-size: 0.8rem;
    opacity: 0.7;
}