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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #F6F7F8;
    color: #000;
}

.tc-header {
    background: #fff;
    padding: 40px 0;
    margin: 0 0 20px 0;
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tc-header-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 30px;
}

.tc-header-title {
    font-size: 36px;
    font-weight: 700;
    color: #000;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.tc-header-disclaimer {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.tc-email-link {
    color: #2196F3;
    text-decoration: none;
    font-weight: 500;
}

.tc-email-link:hover {
    text-decoration: underline;
}

/* Hero Section Styles - transparent background, table-colored benefits */
.tc-hero-section {
    background: transparent;
    padding: 40px 0;
    margin: 0 0 20px 0;
    border-radius: 0;
    text-align: center;
}

.tc-hero-content {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 30px;
}

.tc-hero-title {
    font-size: 36px;
    font-weight: 700;
    color: #000;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.tc-hero-subtitle {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 30px 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.tc-benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.tc-benefit-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px 20px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.tc-benefit-card:hover {
    background: #fafafa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.tc-benefit-value {
    font-size: 42px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1;
}

.tc-benefit-label {
    font-size: 15px;
    color: #666;
    line-height: 1.4;
}

@media (max-width: 1024px) {
    .tc-hero-title {
        font-size: 32px;
    }
    
    .tc-hero-subtitle {
        font-size: 15px;
    }
    
    .tc-benefits-grid {
        gap: 15px;
    }
    
    .tc-benefit-value {
        font-size: 36px;
    }
    
    .tc-benefit-label {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .tc-hero-section {
        padding: 30px 0;
    }
    
    .tc-hero-content {
        padding: 0 20px;
    }
    
    .tc-hero-title {
        font-size: 28px;
        margin-bottom: 10px;
    }
    
    .tc-hero-subtitle {
        font-size: 14px;
        margin-bottom: 25px;
    }
    
    .tc-benefits-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .tc-benefit-card {
        padding: 15px 10px;
    }
    
    .tc-benefit-value {
        font-size: 24px;
    }
    
    .tc-benefit-label {
        font-size: 11px;
    }
}

.trading-challenges-wrapper {
    display: flex;
    min-height: 100vh;
    padding: 15px;
    align-items: flex-start;
    gap: 15px;
}

.sidebar {
    width: 280px;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    align-self: flex-start;
    margin-top: 0;
    position: sticky;
    top: 15px;
}

.sidebar h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #000;
}

.filter-section {
    margin-bottom: 20px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section h4 {
    font-size: 14px;
    color: #000;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-weight: normal;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    padding: 8px 16px;
    border: none;
    background: #F6F7F8;
    color: #000;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.filter-btn.active {
    background: #F4B63E;
    color: #000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.range-slider {
    height: 6px;
    margin: 15px 0;
}

.noUi-target {
    background: #d0d0d0;
    border: none;
    box-shadow: none;
    border-radius: 3px;
}

.noUi-connect {
    background: #F4B63E;
}

.noUi-handle {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #F4B63E;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    cursor: pointer;
}

.noUi-handle:before,
.noUi-handle:after {
    display: none;
}

.noUi-horizontal {
    height: 6px;
}

.noUi-horizontal .noUi-handle {
    width: 14px;
    height: 14px;
    right: -7px;
    top: -4px;
}

.range-values {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #000;
    margin-top: 8px;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: transparent;
    color: transparent;
    border: 1.5px solid #999;
    font-size: 10px;
    cursor: help;
    position: relative;
    flex-shrink: 0;
    margin-left: 4px;
    vertical-align: middle;
    line-height: 1;
    font-style: normal;
    padding: 0;
}

.info-icon::after {
    content: '?';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translate(-0.5px, 0px);
    color: #999;
    font-size: 10px;
}

.info-icon:hover {
    background: #f0f0f0;
    border-color: #666;
}

.info-icon:hover::after {
    color: #323233;
}

.tooltip {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #323233;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    width: 250px;
    max-width: calc(100vw - 40px);
    font-size: 13px;
    line-height: 1.5;
    z-index: 9999999 !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    white-space: normal;
    font-style: normal;
}

.info-icon:hover .tooltip {
    opacity: 1;
    pointer-events: auto;
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: #fff;
}

.tooltip a {
    color: #2196F3;
    text-decoration: none;
    font-style: normal;
}

.tooltip a:hover {
    text-decoration: underline;
}

.main-content {
    flex: 1;
    padding: 0;
}

.table-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.challenges-table-container {
    display: table;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-header {
    display: table-row;
    background: #fff;
}

.table-header > div {
    display: table-cell;
    padding: 16px 8px;
    font-size: 13px;
    color: #000;
    font-weight: 600;
    text-transform: none;
    border-bottom: 2px solid #e0e0e0;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    line-height: 1.4;
    background: #fff;
}

.table-header > div .info-icon {
    display: block;
    margin: 4px auto 0;
}

.col-company {
    position: sticky;
    left: 0;
    z-index: 20;
    background: #fff;
    width: 80px;
    text-align: center !important;
}

.table-header .col-company {
    background: #fff;
    z-index: 30;
    cursor: default;
}

.col-challenge-name {
    width: 180px;
    text-align: left !important;
}

.col-actions {
    position: sticky;
    right: 0;
    z-index: 20;
    background: #fff;
    width: 120px;
}

.table-header .col-actions {
    background: #fff;
    z-index: 30;
}

.col-price { width: 100px; }
.col-size { width: 90px; }
.col-steps { width: 90px; }
.col-target { width: 100px; }
.col-split { width: 120px; }
.col-loss { width: 140px; white-space: nowrap; }
.col-payout { width: 120px; }
.col-leverage { width: 120px; }

.challenges-table {
    display: table-row-group;
}

.challenge-row {
    display: table-row;
    cursor: pointer;
    transition: background 0.2s;
}

.challenge-row:hover > * {
    background: #fafafa;
}

.challenge-row > div {
    display: table-cell;
    padding: 15px 8px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    text-align: center;
}

.challenge-row .col-challenge-name {
    text-align: left;
}

.col-company {
    vertical-align: middle !important;
}

.challenge-logo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    overflow: visible;
    background: #f0f0f0;
    vertical-align: middle;
}

.challenge-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.discount-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #F4B63E;
    color: #000;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    z-index: 2;
}

.challenge-name {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.company-label {
    font-size: 13px;
    color: #000;
    text-transform: none;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    font-weight: 600;
}

.rating-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.rating-box {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border: 2px solid #F4B63E;
    border-radius: 20px;
    background: transparent;
}

.rating-score {
    font-size: 11px;
    font-weight: 600;
    color: #000;
}

.rating-stars {
    display: flex;
    gap: 1px;
}

.rating-star {
    font-size: 12px;
    color: #F4B63E;
}

.rating-star.empty {
    color: #ddd;
}

.rating-reviews {
    font-size: 11px;
    color: #F4B63E;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.rating-reviews .info-icon {
    border-color: #F4B63E;
}

.rating-reviews .info-icon::after {
    color: #F4B63E;
}

.price {
    font-size: 17px;
    color: #318740;
    margin-bottom: 2px;
    font-weight: 600;
}

.old-price {
    font-size: 11px;
    color: #323233;
    text-decoration: line-through;
}

.info-value {
    font-size: 14px;
    color: #000;
}

.profit-split-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.profit-bar {
    height: 3px;
    background: #F4B63E;
    border-radius: 1.5px;
    transition: width 0.3s;
}

.profit-bar-container {
    width: 100%;
    height: 3px;
    background: #e8e8e8;
    border-radius: 1.5px;
    overflow: hidden;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-primary {
    background: #F4B63E;
    color: #000;
    font-weight: 600;
}

.btn-primary:hover {
    background: #e5a830;
}

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    animation: fadeIn 0.3s;
}

.popup-overlay.active {
    display: block;
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    background: #ffffff;
    color: #323233;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    border-radius: 16px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease-out;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.popup.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.popup-fixed-header {
    flex-shrink: 0;
    padding: 30px 30px 20px 30px;
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
}

.popup-scrollable-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 30px 30px 30px;
}

.popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.popup-title-section {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 0;
}

.popup-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 8px;
}

.popup-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.popup-header-info {
    flex: 1;
    min-width: 0;
}

.popup-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #323233;
}

.popup-rating-reviews {
    display: flex;
    align-items: center;
}

.popup-price-buy {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.popup-price-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.popup-current-price {
    font-size: 24px;
    color: #318740;
    font-weight: 600;
}

.popup-old-price {
    font-size: 14px;
    color: #666;
    text-decoration: line-through;
}

.popup-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    color: #666;
    line-height: 1;
    flex-shrink: 0;
}

.popup-close:hover {
    color: #323233;
}

.popup-overviews-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.popup-overview-column {
    display: flex;
    flex-direction: column;
}

.popup-drawdown-section {
    background: #f0f0f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}

.popup-drawdown-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #323233;
    margin-bottom: 15px;
}

.popup-step {
    margin-bottom: 15px;
}

.popup-step:last-child {
    margin-bottom: 0;
}

.popup-step-label {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popup-step-values {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    margin-bottom: 8px;
}

.popup-step-loss {
    color: #ff6b6b;
}

.popup-step-target {
    color: #318740;
}

.popup-progress-bar {
    position: relative;
    height: 6px;
    background: #3a3a3a;
    border-radius: 3px;
}

.popup-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b 0%, #ffd43b 50%, #318740 100%);
    border-radius: 3px;
}

.popup-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.popup-card {
    background: #f0f0f0;
    border-radius: 10px;
    padding: 12px;
}

.popup-card-label {
    font-size: 11px;
    color: #323233;
    margin-bottom: 6px;
}

.popup-card-value {
    font-size: 13px;
    color: #323233;
}

.popup-section-title {
    font-size: 18px;
    margin-bottom: 15px;
    margin-top: 25px;
}

.popup-overview-list {
    margin-bottom: 20px;
}

.popup-overview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

.popup-overview-label {
    color: #000;
}

.popup-overview-value {
    color: #000;
}

.popup-overview-value.yes {
    color: #318740;
}

.popup-overview-value.no {
    color: #ff6b6b;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination a,
.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    text-decoration: none;
    color: #000;
    display: inline-block;
}

.pagination a:hover:not(.active),
.pagination-btn:hover:not(.active) {
    background: #F6F7F8;
}

.pagination a.active,
.pagination-btn.active {
    background: #F4B63E;
    color: #000;
    border-color: #F4B63E;
}

.pagination-dots {
    padding: 8px 12px;
    color: #666;
}

/* Sorting indicators */
.table-header > div[data-sort] {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.sort-icon {
    display: inline-block;
    width: 8px;
    height: 12px;
    margin-right: 4px;
    position: relative;
    opacity: 0.3;
}

.sort-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 5px solid #666;
}

.sort-icon::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #666;
}

.sorted-asc .sort-icon {
    opacity: 1;
}

.sorted-asc .sort-icon::before {
    border-bottom-color: #000;
}

.sorted-asc .sort-icon::after {
    border-top-color: #ccc;
}

.sorted-desc .sort-icon {
    opacity: 1;
}

.sorted-desc .sort-icon::before {
    border-bottom-color: #ccc;
}

.sorted-desc .sort-icon::after {
    border-top-color: #000;
}

.mobile-filters-btn {
    display: none;
}

.mobile-filters-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    z-index: 1001;
    transform: translateY(100%);
    transition: transform 0.3s;
    overflow-y: auto;
    padding: 20px;
}

.mobile-filters-popup.active {
    transform: translateY(0);
}

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

.mobile-filters-header h3 {
    font-size: 20px;
    color: #000;
}

.mobile-filters-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0;
}

@media (max-width: 768px) {
    .tc-header {
        margin: 0 0 15px 0;
        padding: 24px 0;
        border-radius: 0;
    }
    
    .tc-header-content {
        flex-direction: column;
        gap: 0;
        padding: 0 20px;
    }
    
    .tc-header-title {
        font-size: 28px;
        margin: 0 0 12px 0;
    }
    
    .tc-header-disclaimer {
        font-size: 13px;
    }
    
    .trading-challenges-wrapper {
        padding: 0;
    }

    .sidebar {
        display: none;
    }

    .main-content {
        padding: 0;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .table-wrapper {
        overflow-x: auto;
        width: 100%;
        max-width: 100vw;
    }

    .mobile-filters-btn {
        display: block;
        width: 100%;
        padding: 12px;
        background: #080C0E;
        color: #fff;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        cursor: pointer;
        margin-bottom: 15px;
    }

    .col-company {
        width: 60px;
    }

    .col-challenge-name {
        width: 140px;
    }

    .challenge-logo {
        width: 40px;
        height: 40px;
    }

    .discount-badge {
        width: 24px;
        height: 24px;
        font-size: 9px;
    }

    .company-label {
        font-size: 10px;
    }

    .table-header > div {
        font-size: 10px;
        padding: 10px 6px;
    }
    
    /* Mobile: Keep table structure but center content */
    .table-header > div[data-sort] {
        text-align: center;
    }
    
    .table-header > div[data-sort] .sort-icon {
        display: block;
        margin: 0 auto 2px;
    }
    
    /* Mobile: Non-sortable Firm column */
    .table-header .col-company {
        text-align: center;
    }

    .table-header {
        position: sticky;
        top: 0;
        z-index: 20;
        background: #fff;
    }

    .challenge-row > div {
        padding: 12px 6px;
    }

    /* Mobile rating - show one star and info icon */
    .rating-stars {
        display: flex;
        gap: 1px;
    }

    .rating-star:not(:first-child) {
        display: none;
    }

    .rating-reviews {
        display: inline-flex !important;
        align-items: center;
        gap: 2px;
        font-size: 0; /* Hide text but keep icon */
    }
    
    .rating-reviews .info-icon {
        font-size: 10px; /* Restore icon size */
    }

    .rating-box {
        padding: 2px 6px;
        gap: 2px;
    }
    
    /* Mobile popup - full screen */
    .popup {
        position: fixed !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        transform: translateY(100%) !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }
    
    .popup-close {
        position: absolute;
        top: 20px;
        right: 20px;
        z-index: 10;
    }
    
    .popup.active {
        transform: translateY(0) !important;
    }
    
    .popup-overlay {
        display: none !important;
    }
    
    .popup-fixed-header {
        padding: 20px 20px 15px 20px;
    }
    
    .popup-scrollable-content {
        padding: 15px 20px 20px 20px;
    }
    
    .popup-grid {
        grid-template-columns: 1fr;
    }
    
    .popup-overviews-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .popup-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .popup-price-buy {
        width: 100%;
        justify-content: space-between;
    }
}

.trading-challenges-error {
    padding: 40px;
    text-align: center;
    background: #fff;
    border-radius: 12px;
    color: #ff6b6b;
    font-size: 16px;
}

/* Hide leverage column */
.col-leverage {
    display: none !important;
}
