/* Melbet Bangladesh - Optimized Styles */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FFC700;
    --primary-dark: #E6B300;
    --secondary-color: #1A1A1A;
    --background-dark: #0D0D0D;
    --background-light: #1F1F1F;
    --text-light: #FFFFFF;
    --text-gray: #B0B0B0;
    --success-color: #4CAF50;
    --border-color: #333333;
    --gradient-dark: linear-gradient(135deg, #1A1A1A 0%, #0D0D0D 100%);
    --gradient-gold: linear-gradient(135deg, #FFC700 0%, #FFD700 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeSpeed;
}

/* Prevent layout shift from images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

img[width][height] {
    aspect-ratio: attr(width) / attr(height);
}

/* Font loading optimization */
@font-face {
    font-family: 'Segoe UI';
    font-display: swap;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: var(--secondary-color);
    border-bottom: 2px solid var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo a {
    display: block;
    line-height: 0;
}

.logo img {
    height: 45px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.logo a:hover img {
    transform: scale(1.05);
}

.nav {
    display: flex;
    gap: 25px;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: 8px 0;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.header-buttons {
    display: flex;
    gap: 15px;
    min-width: 230px;
    justify-content: flex-end;
}

/* Button Styles */
.btn {
    padding: 12px 28px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    line-height: 1.5;
}

a.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--gradient-gold);
    color: var(--secondary-color);
    box-shadow: 0 4px 15px rgba(255, 199, 0, 0.3);
    will-change: transform;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 199, 0, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
}

.btn-large {
    padding: 16px 36px;
    font-size: 18px;
}

/* Hero Section */
.hero {
    background: var(--gradient-dark);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    min-height: 600px;
    height: auto;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('img/melbet-1.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: 0;
    will-change: opacity;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.85) 0%, rgba(13, 13, 13, 0.75) 100%);
    z-index: 1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 24px;
    color: var(--text-gray);
    margin-bottom: 30px;
}

.hero-features {
    list-style: none;
    margin-bottom: 40px;
}

.hero-features li {
    font-size: 18px;
    padding: 10px 0;
    color: var(--text-gray);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    min-height: 56px;
}

.hero-image {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.hero-card {
    background: var(--background-light);
    padding: 30px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    will-change: transform;
}

.hero-card:hover {
    border-color: var(--primary-color);
    transform: translate3d(0, -5px, 0);
    box-shadow: 0 8px 25px rgba(255, 199, 0, 0.2);
}

.hero-card h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

/* Section Styles */
.section {
    padding: 80px 0;
}

/* Reserve minimum height to prevent CLS */
.section:not(.hero) {
    min-height: 600px;
}

.section-dark {
    background: var(--background-light);
}

.section-title {
    font-size: 42px;
    text-align: center;
    margin-bottom: 50px;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-block {
    max-width: 900px;
    margin: 0 auto 50px;
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-gray);
}

.content-block p {
    margin-bottom: 20px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin: 60px 0;
    min-height: 200px;
}

.stat-card {
    background: var(--background-light);
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid var(--border-color);
    transition: border-color 0.3s;
    min-height: 180px;
}

.stat-card:hover {
    border-color: var(--primary-color);
}

@media (hover: hover) and (pointer: fine) {
    .stat-card {
        transition: transform 0.3s, border-color 0.3s;
    }
    .stat-card:hover {
        transform: translate3d(0, -5px, 0);
    }
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 16px;
    color: var(--text-gray);
}

/* Table Styles */
.table-container {
    margin: 60px 0;
    overflow-x: auto;
}

.table-container h3 {
    font-size: 28px;
    margin-bottom: 25px;
    color: var(--primary-color);
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--background-light);
    border-radius: 12px;
    overflow: hidden;
}

.info-table thead {
    background: var(--secondary-color);
}

.info-table th {
    padding: 18px;
    text-align: left;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.info-table td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-gray);
}

.info-table tr:last-child td {
    border-bottom: none;
}

.info-table tr:hover {
    background: rgba(255, 199, 0, 0.05);
}

.info-table .highlight {
    color: var(--primary-color);
    font-weight: 600;
}

/* Bonus Section */
.bonus-hero {
    display: flex;
    justify-content: center;
    margin-bottom: 60px;
}

.bonus-card-large {
    background: var(--gradient-dark);
    padding: 60px;
    border-radius: 16px;
    border: 3px solid var(--primary-color);
    text-align: center;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(255, 199, 0, 0.2);
}

.bonus-badge {
    display: inline-block;
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.bonus-card-large h3 {
    font-size: 32px;
    margin-bottom: 30px;
}

.bonus-amount {
    font-size: 64px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 20px 0;
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin: 60px 0;
}

.step-card {
    background: var(--background-dark);
    padding: 35px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid var(--border-color);
    transition: border-color 0.3s;
    min-height: 220px;
}

.step-card:hover {
    border-color: var(--primary-color);
    transform: translate3d(0, -5px, 0);
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--gradient-gold);
    color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.step-card p {
    color: var(--text-gray);
}

/* Login Methods */
.login-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 60px 0;
}

.method-card {
    background: var(--background-light);
    padding: 40px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: transform 0.3s, border-color 0.3s;
    will-change: transform;
}

.method-card:hover {
    border-color: var(--primary-color);
    transform: translate3d(0, -5px, 0);
}

.method-card h3 {
    font-size: 24px;
    margin-bottom: 25px;
    color: var(--primary-color);
}

.method-card ol {
    padding-left: 20px;
    color: var(--text-gray);
}

.method-card li {
    margin-bottom: 12px;
    line-height: 1.6;
}

/* Registration Methods */
.registration-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 60px 0;
}

.reg-method-card {
    background: var(--background-dark);
    padding: 40px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    text-align: center;
    transition: transform 0.3s, border-color 0.3s;
    will-change: transform;
}

.reg-method-card:hover {
    border-color: var(--primary-color);
    transform: translate3d(0, -5px, 0);
}

.reg-method-card.highlight-card {
    border-color: var(--primary-color);
    background: rgba(255, 199, 0, 0.05);
}

.reg-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.reg-method-card h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.reg-time {
    color: var(--text-gray);
    font-size: 14px;
    margin-bottom: 20px;
}

.reg-method-card ul {
    list-style: none;
    text-align: left;
    margin-top: 20px;
}

.reg-method-card li {
    padding: 8px 0;
    color: var(--text-gray);
    border-bottom: 1px solid var(--border-color);
}

.reg-method-card li:last-child {
    border-bottom: none;
}

/* Steps Detailed */
.steps-detailed {
    margin: 60px 0;
}

.steps-detailed h3 {
    font-size: 28px;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.step-detailed {
    display: flex;
    gap: 25px;
    margin-bottom: 30px;
    padding: 25px;
    background: var(--background-dark);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.step-num {
    width: 50px;
    height: 50px;
    background: var(--gradient-gold);
    color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-light);
}

.step-content p {
    color: var(--text-gray);
}

/* Offers Grid */
.offers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 60px 0;
}

.offer-card {
    background: var(--background-dark);
    padding: 35px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: border-color 0.3s, box-shadow 0.3s;
    min-height: 380px;
}

.offer-card:hover {
    border-color: var(--primary-color);
    transform: translate3d(0, -5px, 0);
    box-shadow: 0 8px 25px rgba(255, 199, 0, 0.2);
}

.offer-badge {
    display: inline-block;
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 6px 15px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
}

.offer-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    min-height: 60px;
}

.offer-amount {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 15px 0;
}

.offer-card p {
    color: var(--text-gray);
    margin-bottom: 20px;
    min-height: 45px;
}

.offer-features {
    list-style: none;
    margin-top: 20px;
}

.offer-features li {
    padding: 8px 0;
    color: var(--text-gray);
    border-top: 1px solid var(--border-color);
}

/* Calendar Chart */
.chart-container {
    margin: 60px 0;
}

.chart-container h3 {
    font-size: 28px;
    margin-bottom: 30px;
    color: var(--primary-color);
    text-align: center;
}

.calendar-chart {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 15px;
}

.calendar-item {
    background: var(--background-dark);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid var(--border-color);
    transition: border-color 0.3s, background-color 0.3s;
}

.calendar-item:hover,
.calendar-item.highlight-calendar {
    border-color: var(--primary-color);
    background: rgba(255, 199, 0, 0.05);
}

.calendar-day {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-light);
}

.calendar-offer {
    font-size: 14px;
    color: var(--primary-color);
}

/* App Section */
.app-download-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin: 60px 0;
}

.app-platform {
    background: var(--background-dark);
    padding: 50px;
    border-radius: 16px;
    border: 2px solid var(--border-color);
    text-align: center;
}

.platform-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.app-platform h3 {
    font-size: 28px;
    margin-bottom: 10px;
}

.app-platform p {
    color: var(--text-gray);
    margin-bottom: 20px;
}

.app-features {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.app-features span {
    background: var(--background-light);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-gray);
}

.download-steps {
    margin-top: 30px;
    text-align: left;
}

.download-steps h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.download-steps ol {
    padding-left: 20px;
    color: var(--text-gray);
}

.download-steps li {
    margin-bottom: 10px;
}

/* Features Grid */
.app-features-list {
    margin: 60px 0;
}

.app-features-list h3 {
    font-size: 28px;
    margin-bottom: 30px;
    color: var(--primary-color);
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-item {
    background: var(--background-light);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid var(--border-color);
    transition: transform 0.3s, border-color 0.3s;
    will-change: transform;
}

.feature-item:hover {
    border-color: var(--primary-color);
    transform: translate3d(0, -5px, 0);
}

.feature-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 15px;
}

.feature-item h4 {
    font-size: 20px;
    margin-bottom: 10px;
}

.feature-item p {
    color: var(--text-gray);
    font-size: 14px;
}

/* FAQ Section */
.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--background-light);
    margin-bottom: 20px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    overflow: hidden;
    transition: border-color 0.3s;
}

.faq-item:hover {
    border-color: var(--primary-color);
}

.faq-question {
    padding: 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.faq-question h3 {
    font-size: 20px;
    color: var(--text-light);
}

.faq-toggle {
    font-size: 28px;
    color: var(--primary-color);
    font-weight: 300;
    transition: transform 0.3s;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 25px 25px;
    color: var(--text-gray);
    line-height: 1.8;
}

/* Contact Section */
.contact-section {
    margin-top: 80px;
    text-align: center;
}

.contact-section h3 {
    font-size: 32px;
    margin-bottom: 40px;
    color: var(--primary-color);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.contact-card {
    background: var(--background-light);
    padding: 40px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: transform 0.3s, border-color 0.3s;
    will-change: transform;
}

.contact-card:hover {
    border-color: var(--primary-color);
    transform: translate3d(0, -5px, 0);
}

.contact-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 20px;
}

.contact-card h4 {
    font-size: 22px;
    margin-bottom: 10px;
}

.contact-card p {
    color: var(--text-gray);
    margin-bottom: 20px;
}

/* Footer */
.footer {
    background: var(--secondary-color);
    border-top: 2px solid var(--primary-color);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h4 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.footer-column p {
    color: var(--text-gray);
    margin-bottom: 20px;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-icon {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s;
}

.social-icon:hover {
    color: var(--primary-color);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.payment-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.payment-badge {
    background: var(--background-light);
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-gray);
    border: 1px solid var(--border-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    color: var(--text-gray);
    margin-bottom: 10px;
}

.disclaimer {
    font-size: 14px;
    color: #888;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .hero {
        min-height: 500px;
        padding: 60px 0;
    }
    
    .stats-grid,
    .steps-grid,
    .offers-grid,
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section:not(.hero) {
        min-height: 500px;
    }
    
    .stats-grid {
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .hero {
        min-height: 450px;
        padding: 40px 0;
    }
    
    .hero h1 {
        font-size: 32px;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section:not(.hero) {
        min-height: 450px;
    }
    
    .stats-grid {
        min-height: 600px;
    }
    
    .section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .stats-grid,
    .steps-grid,
    .login-methods,
    .registration-methods,
    .offers-grid,
    .app-download-section,
    .features-grid,
    .contact-grid,
    .calendar-chart {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
        text-align: center;
        padding: 14px 24px;
    }
    
    /* Optimize cards for mobile */
    .stat-card {
        padding: 25px;
        min-height: 160px;
    }
    
    .step-card {
        padding: 25px;
        min-height: 200px;
    }
    
    .offer-card {
        padding: 25px;
        min-height: 360px;
    }
    
    .method-card {
        padding: 25px;
        min-height: 280px;
    }
    
    /* Reduce background image on mobile for performance */
    .hero::before {
        opacity: 0.08;
        background-size: cover;
        background-position: center center;
        background-attachment: scroll;
    }
    
    /* Optimize table for mobile */
    .info-table {
        font-size: 14px;
    }
    
    .info-table th,
    .info-table td {
        padding: 12px 10px;
    }
}

/* Animations - optimized to prevent CLS */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Reduce motion for accessibility and performance */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Very small mobile optimization */
@media (max-width: 375px) {
    .hero {
        min-height: 420px;
        padding: 30px 0;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section:not(.hero) {
        min-height: 400px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .stat-card {
        padding: 20px;
        min-height: 150px;
    }
    
    .step-card {
        padding: 20px;
        min-height: 190px;
    }
    
    .offer-card {
        padding: 20px;
        min-height: 350px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Selection Color */
::selection {
    background: var(--primary-color);
    color: var(--secondary-color);
}
