/* Exchange Index Specific Styles */

/* Hero Section */
.exchanges-hero {
    background-color: #ffffff;
    border-bottom: 1px solid #e4e7ec;
    padding: 80px 0 64px;
    text-align: center;
}

.exchanges-hero .hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 24px;
    color: #101828;
    letter-spacing: -0.02em;
}

.exchanges-hero .subtitle {
    font-size: 20px;
    color: #475467;
    margin-bottom: 40px;
    line-height: 1.5;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-top: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stat {
    text-align: center;
}

.hero-stat .stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #101828;
    display: block;
    line-height: 1.2;
    margin-bottom: 8px;
}

.hero-stat .stat-label {
    color: #475467;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Filters Section */
.filters-section {
    background-color: #f9fafb;
    padding: 48px 0;
    border-bottom: 1px solid #e4e7ec;
}

.filters-container {
    display: flex;
    gap: 24px;
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: 600;
    color: #344054;
    font-size: 14px;
}

.filter-select,
.filter-input {
    padding: 12px 16px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: all 0.2s;
    min-width: 150px;
    color: #101828;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #f79009;
    box-shadow: 0 0 0 4px rgba(247, 144, 9, 0.1);
}

.filter-input {
    min-width: 200px;
}

/* Exchange Rankings Section */
.exchange-rankings {
    padding: 80px 0;
    background-color: #ffffff;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: #101828;
    letter-spacing: -0.02em;
}

.view-controls {
    display: flex;
    gap: 8px;
}

.view-toggle {
    padding: 10px 16px;
    border: 1px solid #d0d5dd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 14px;
    color: #344054;
}

.view-toggle.active,
.view-toggle:hover {
    border-color: #f79009;
    background: #f79009;
    color: white;
}

/* Table View */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e4e7ec;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.1);
}

.exchanges-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.exchanges-table th {
    background-color: #f9fafb;
    color: #344054;
    padding: 16px 24px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 1px solid #e4e7ec;
}

.exchanges-table td {
    padding: 20px 24px;
    border-bottom: 1px solid #f2f4f7;
    vertical-align: middle;
}

.exchanges-table tbody tr:hover {
    background-color: #f9fafb;
}

.rank-badge {
    background-color: #f79009;
    color: #ffffff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    margin-right: 12px;
}

.exchange-name {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #101828;
}

.exchange-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin-right: 12px;
    object-fit: cover;
}

.score {
    font-weight: 600;
    color: #027a48;
    font-size: 16px;
}

.security-rating {
    background-color: #ecfdf3;
    color: #027a48;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.security-rating.a-plus {
    background-color: #ecfdf3;
    color: #027a48;
}

.security-rating.a {
    background-color: #ecfdf3;
    color: #027a48;
}

.security-rating.b-plus {
    background-color: #fef3c7;
    color: #92400e;
}

.security-rating.b {
    background-color: #fef2f2;
    color: #dc2626;
}

.volume {
    font-weight: 500;
    color: #344054;
}

.fees {
    font-weight: 500;
    color: #344054;
}

.region,
.type {
    font-size: 14px;
    color: #475467;
    text-transform: capitalize;
}

.view-details {
    background-color: #f79009;
    color: #ffffff;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.view-details:hover {
    background-color: #dc6803;
}

/* Card View */
.card-view {
    display: none;
}

.card-view:not(.hidden) {
    display: block;
}

.exchanges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.exchange-card {
    background-color: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    padding: 32px;
    transition: all 0.2s;
    cursor: pointer;
}

.exchange-card:hover {
    border-color: #f79009;
    box-shadow: 0 4px 8px rgba(16, 24, 40, 0.1);
}

.exchange-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.exchange-card-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.exchange-card-info h3 {
    font-size: 20px;
    font-weight: 600;
    color: #101828;
    margin-bottom: 4px;
}

.exchange-card-rank {
    font-size: 14px;
    color: #475467;
}

.exchange-card-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 16px;
    background-color: #f9fafb;
    border-radius: 8px;
}

.exchange-card-stat {
    text-align: center;
}

.exchange-card-stat-value {
    font-weight: 600;
    color: #101828;
    display: block;
    font-size: 18px;
    margin-bottom: 4px;
}

.exchange-card-stat-label {
    font-size: 12px;
    color: #475467;
    font-weight: 500;
}

.exchange-card-description {
    color: #475467;
    margin-bottom: 24px;
    line-height: 1.5;
}

.exchange-card-actions {
    display: flex;
    gap: 8px;
}

.exchange-card-button {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #d0d5dd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    color: #344054;
}

.exchange-card-button.primary {
    background-color: #f79009;
    border-color: #f79009;
    color: white;
}

.exchange-card-button:hover {
    background-color: #f9fafb;
    border-color: #98a2b3;
}

.exchange-card-button.primary:hover {
    background-color: #dc6803;
    border-color: #dc6803;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination-button {
    padding: 10px 16px;
    border: 1px solid #d0d5dd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    color: #344054;
}

.pagination-button:hover,
.pagination-button.active {
    border-color: #f79009;
    background: #f79009;
    color: white;
}

.pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 14px;
    color: #475467;
    margin: 0 20px;
}

/* Comparison Section */
.comparison-section {
    background-color: #f9fafb;
    padding: 80px 0;
}

.comparison-section h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    color: #101828;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.section-subtitle {
    text-align: center;
    font-size: 18px;
    color: #475467;
    margin-bottom: 64px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.comparison-controls {
    display: flex;
    gap: 24px;
    align-items: end;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.comparison-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comparison-selector label {
    font-weight: 600;
    color: #344054;
    font-size: 14px;
}

.compare-select {
    padding: 12px 16px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    min-width: 200px;
    transition: all 0.2s;
    color: #101828;
}

.compare-select:focus {
    outline: none;
    border-color: #f79009;
    box-shadow: 0 0 0 4px rgba(247, 144, 9, 0.1);
}

.compare-button {
    padding: 12px 28px;
    background-color: #f79009;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.compare-button:hover:not(:disabled) {
    background-color: #dc6803;
}

.compare-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.comparison-results {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 32px;
    border: 1px solid #e4e7ec;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.1);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
    padding: 16px 24px;
    text-align: left;
    border-bottom: 1px solid #f2f4f7;
}

.comparison-table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #344054;
    font-size: 14px;
}

.comparison-table .comparison-metric {
    font-weight: 600;
    color: #101828;
}

.comparison-table .comparison-value {
    color: #475467;
}

.comparison-table .comparison-winner {
    background-color: #ecfdf3;
    color: #027a48;
    font-weight: 600;
}

/* Methodology Section */
.methodology-section {
    padding: 80px 0;
    background-color: #ffffff;
}

.methodology-section h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    color: #101828;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.methodology-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.methodology-card {
    background-color: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    padding: 32px;
    transition: all 0.2s;
    cursor: pointer;
}

.methodology-card:hover {
    border-color: #f79009;
    box-shadow: 0 4px 8px rgba(16, 24, 40, 0.1);
}

.methodology-icon {
    width: 40px;
    height: 40px;
    background-color: #fef7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #f79009;
    margin-bottom: 16px;
}

.methodology-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: #101828;
    margin-bottom: 16px;
}

.methodology-card p {
    color: #475467;
    margin-bottom: 24px;
    line-height: 1.5;
}

.methodology-card ul {
    list-style: none;
    padding: 0;
}

.methodology-card li {
    padding: 8px 0;
    color: #475467;
    position: relative;
    padding-left: 20px;
}

.methodology-card li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #027a48;
    font-weight: 700;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background-color: white;
    margin: 3% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid #e4e7ec;
    transform: translateY(-50px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid #e4e7ec;
    background: linear-gradient(135deg, #f9fafb 0%, #f2f4f7 100%);
    border-radius: 16px 16px 0 0;
    position: relative;
}

.modal-header:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #e4e7ec 50%, transparent 100%);
}

.modal-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #101828;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #475467;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #f79009;
    background-color: rgba(247, 144, 9, 0.1);
    transform: scale(1.1);
}

.modal-body {
    padding: 32px;
}

/* Exchange Details Modal Styles */
.exchange-details {
    max-width: 100%;
}

.exchange-details-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e4e7ec;
}

.exchange-details-logo {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.exchange-details-info {
    flex: 1;
}

.exchange-details-info h2 {
    font-size: 28px;
    font-weight: 700;
    color: #101828;
    margin-bottom: 12px;
    line-height: 1.2;
}

.exchange-details-description {
    font-size: 16px;
    color: #475467;
    line-height: 1.6;
    margin-bottom: 20px;
}

.exchange-details-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    font-size: 14px;
    color: #344054;
}

.exchange-details-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.exchange-details-meta strong {
    color: #101828;
    font-weight: 600;
}

.exchange-details-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
    padding: 24px;
    background: linear-gradient(135deg, #f9fafb 0%, #f2f4f7 100%);
    border-radius: 12px;
    border: 1px solid #e4e7ec;
}

.stat-card {
    text-align: center;
    padding: 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #101828;
    margin-bottom: 8px;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 12px;
    color: #475467;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.exchange-details-features {
    margin-bottom: 32px;
}

.exchange-details-features h3 {
    font-size: 20px;
    font-weight: 600;
    color: #101828;
    margin-bottom: 16px;
}

.features-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feature-tag {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #fef7ed 0%, #fed7aa 100%);
    color: #92400e;
    border: 1px solid #fed7aa;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.feature-tag:hover {
    background: linear-gradient(135deg, #f79009 0%, #dc6803 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(247, 144, 9, 0.3);
}

.exchange-details-pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.pros-cons-column h3 {
    font-size: 18px;
    font-weight: 600;
    color: #101828;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pros-cons-column h3:before {
    content: '';
    width: 4px;
    height: 20px;
    border-radius: 2px;
}

.pros-cons-column:first-child h3:before {
    background: #027a48;
}

.pros-cons-column:last-child h3:before {
    background: #d92d20;
}

.pros-list,
.cons-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pros-list li,
.cons-list li {
    padding: 12px 0;
    border-bottom: 1px solid #f2f4f7;
    position: relative;
    padding-left: 24px;
    font-size: 14px;
    line-height: 1.5;
    color: #344054;
}

.pros-list li:last-child,
.cons-list li:last-child {
    border-bottom: none;
}

.pros-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #027a48;
    font-weight: 700;
    font-size: 16px;
}

.cons-list li:before {
    content: "✗";
    position: absolute;
    left: 0;
    color: #d92d20;
    font-weight: 700;
    font-size: 16px;
}

.exchange-details-actions {
    display: flex;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid #e4e7ec;
}

.visit-website-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #f79009 0%, #dc6803 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(247, 144, 9, 0.3);
}

.visit-website-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(247, 144, 9, 0.4);
    color: white;
    text-decoration: none;
}

.visit-website-btn:before {
    content: "🌐";
    font-size: 18px;
}

.add-to-comparison-btn {
    flex: 1;
    padding: 14px 24px;
    background: white;
    color: #344054;
    border: 2px solid #d0d5dd;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-to-comparison-btn:hover {
    border-color: #f79009;
    color: #f79009;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.add-to-comparison-btn:before {
    content: "⚖️";
    font-size: 16px;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-30 {
    margin-top: 30px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .exchanges-hero .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-select,
    .filter-input {
        min-width: auto;
    }
    
    .section-header {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
    
    .exchanges-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .compare-select {
        min-width: auto;
    }
    
    .methodology-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-header,
    .modal-body {
        padding: 20px;
    }
    
    .exchange-details-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .exchange-details-logo {
        width: 60px;
        height: 60px;
        margin: 0 auto;
    }
    
    .exchange-details-info h2 {
        font-size: 24px;
    }
    
    .exchange-details-meta {
        justify-content: center;
        gap: 16px;
    }
    
    .exchange-details-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 16px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-card .stat-value {
        font-size: 20px;
    }
    
    .exchange-details-pros-cons {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .exchange-details-actions {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .exchanges-hero {
        padding: 60px 0;
    }
    
    .exchanges-hero .hero-content h1 {
        font-size: 28px;
    }
    
    .exchanges-hero .subtitle {
        font-size: 16px;
    }
    
    .hero-stat .stat-value {
        font-size: 28px;
    }
    
    .section-header h2 {
        font-size: 24px;
    }
    
    .exchanges-table th,
    .exchanges-table td {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .exchange-card {
        padding: 20px;
    }
    
    .methodology-card {
        padding: 20px;
    }
    
    .exchange-details-header {
        gap: 12px;
    }
    
    .exchange-details-logo {
        width: 50px;
        height: 50px;
    }
    
    .exchange-details-info h2 {
        font-size: 20px;
    }
    
    .exchange-details-description {
        font-size: 14px;
    }
    
    .exchange-details-meta {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .exchange-details-stats {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px;
    }
    
    .stat-card {
        padding: 8px;
    }
    
    .stat-card .stat-value {
        font-size: 18px;
    }
    
    .stat-card .stat-label {
        font-size: 10px;
    }
    
    .exchange-details-features h3 {
        font-size: 16px;
    }
    
    .feature-tag {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .pros-cons-column h3 {
        font-size: 16px;
    }
    
    .pros-list li,
    .cons-list li {
        font-size: 13px;
        padding: 8px 0;
    }
    
    .visit-website-btn,
    .add-to-comparison-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
}
