/* CENTER FIX - BALANCED APPROACH */

/* FORCE DESKTOP GRID LAYOUT */
@media (min-width: 769px) {
    /* Override mobile styles that break desktop layout */
    html body .content-layout {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 0px !important;
        margin-bottom: 24px !important;
        align-items: stretch !important;
        align-content: start !important;
        max-width: 600px !important;
        box-sizing: border-box !important;
        width: 100% !important;
        justify-content: center !important;
        margin: 0 auto 24px auto !important;
        padding-top: 0 !important;
    }

    html body .left-column {
        display: block !important;
        width: 100% !important;
        max-width: 600px !important;
        margin: 0 auto !important;
    }

    html body .right-column {
        display: none !important;
    }

/* Desktop Centering */
    .container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 90px 40px 40px 40px;
        display: flex;
        flex-direction: column;
        align-items: center;
        box-sizing: border-box;
    }

    .main {
        padding-top: 0;
        min-height: 100vh;
        max-width: 1200px;
        margin: 0 auto;
        padding-left: 0;
        padding-right: 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-header {
        text-align: center;
        padding: 0 0 32px 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .hero-title {
        text-align: center;
        width: 100%;
        margin-bottom: 16px;
    }

    .hero-subtitle {
        text-align: center;
        width: 100%;
        margin-bottom: 0;
    }

    /* Grid layout is already defined above with higher specificity */

    .trader-card {
        padding: 32px;
        height: 100%;
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        box-sizing: border-box;
    }

    .performance-section {
        padding: 32px;
        margin-bottom: 0;
        height: 100%;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .cta-section {
        text-align: center;
        padding: 24px 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .cta-button {
        margin: 16px auto;
        display: block;
        text-align: center;
    }
}

/* Wide screens adjustments */
@media (min-width: 1400px) {
    .content-layout {
        gap: 0px;
    }
}

/* Tablet Centering */
@media (max-width: 768px) and (min-width: 481px) {
    .container {
        padding: 100px 20px 32px 20px;
        max-width: 100%;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .main {
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .content-layout {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 8px;
        justify-items: center;
        width: 100%;
    }

    .trader-card {
        padding: 20px 16px;
        margin-bottom: 0;
        border-radius: 12px;
        width: 100%;
        max-width: 480px;
    }
}

/* Mobile Centering */
@media (max-width: 480px) {
    .container {
        padding: 95px 16px 32px 16px;
        max-width: 100%;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .main {
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .content-layout {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 6px;
        justify-items: center;
        width: 100%;
    }

    .trader-card {
        padding: 16px 12px;
        margin-bottom: 0;
        border-radius: 8px;
        width: 100%;
        max-width: 100%;
    }
}

/* Fix для элементов внутри карточек */
.trader-card .trader-info {
    width: 100%;
    text-align: center;
}

.trader-card .trader-avatar {
    margin: 0 auto 16px auto;
    display: block;
}

.trader-card .trader-name {
    text-align: center;
    width: 100%;
}

.trader-card .trader-stats {
    width: 100%;
    display: flex;
    justify-content: space-around;
    margin: 16px 0;
}

.performance-section .section-title {
    text-align: center;
    width: 100%;
    margin-bottom: 20px;
}

.performance-section .performance-chart {
    width: 100%;
    margin: 0 auto;
} 