/**
 * Kripto Para Piyasası CSS
 * Anasayfada 6 kripto para tablosu - Mobil Uyumlu
 */

/* ============================================
   SECTION & CONTAINER
   ============================================ */

.kripto-piyasasi-section {
    margin: 20px 0;
    padding: 0;
}

.kripto-piyasasi-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* ============================================
   HEADER
   ============================================ */

.kripto-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 8px 8px 0 0;
    margin: 0;
}

.kripto-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.kripto-icon {
    font-size: 22px;
    color: #ffd700;
}

.kripto-view-all {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kripto-view-all:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ============================================
   TABLE WRAPPER
   ============================================ */

.kripto-table-wrapper {
    background: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============================================
   TABLE
   ============================================ */

.kripto-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.kripto-table thead {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.kripto-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.kripto-table th.th-rank {
    display: none;
}

.kripto-table th.th-price,
.kripto-table th.th-market,
.kripto-table th.th-volume,
.kripto-table th.th-change24,
.kripto-table th.th-change7d {
    text-align: right;
}

.kripto-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}

.kripto-table tbody tr:last-child {
    border-bottom: none;
}

.kripto-table tbody tr:hover {
    background-color: #f8fafc;
}

.kripto-table td {
    padding: 16px;
    font-size: 14px;
    color: #334155;
    vertical-align: middle;
}

.kripto-table td.td-rank {
    display: none;
}

.kripto-table td.td-price,
.kripto-table td.td-market,
.kripto-table td.td-volume,
.kripto-table td.td-change24,
.kripto-table td.td-change7d {
    text-align: right;
    font-weight: 600;
}

.kripto-table td.td-price {
    color: #1e293b;
    font-weight: 700;
    font-size: 15px;
}

/* ============================================
   CRYPTO INFO
   ============================================ */

.crypto-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.crypto-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.crypto-name-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.crypto-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.2;
}

.crypto-symbol {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

/* ============================================
   CHANGE BADGE
   ============================================ */

.change-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.change-badge.positive {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.change-badge.negative {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* ============================================
   LOADING STATE
   ============================================ */

.kripto-loading {
    text-align: center;
    padding: 60px 20px !important;
    color: #94a3b8;
    font-size: 14px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .kripto-piyasasi-container {
        padding: 0 12px;
    }
    
    .kripto-header {
        padding: 12px 16px;
    }
    
    .kripto-title {
        font-size: 16px;
    }
    
    .kripto-view-all {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* MOBİL - SADECE 3 KOLON */
@media (max-width: 768px) {
    .kripto-piyasasi-section {
        margin: 15px 0;
    }
    
    .kripto-piyasasi-container {
        padding: 0 8px;
    }
    
    .kripto-header {
        padding: 10px 12px;
        border-radius: 8px 8px 0 0;
    }
    
    .kripto-title {
        font-size: 14px;
        gap: 8px;
    }
    
    .kripto-header .kripto-icon {
        font-size: 18px;
    }
    
    .kripto-view-all {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    /* TABLE WRAPPER */
    .kripto-table-wrapper {
        background: #fff;
        border-radius: 0 0 8px 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* TABLE - Kompakt */
    .kripto-table {
        width: 100%;
        min-width: 0;
        display: table;
        border-collapse: collapse;
    }
    
    /* THEAD - Başlıklar görünür */
    .kripto-table thead {
        display: table-header-group;
        background: #f8fafc;
    }
    
    .kripto-table thead tr {
        display: table-row;
    }
    
    .kripto-table thead th {
        display: table-cell;
        padding: 10px 8px;
        font-size: 9px;
        font-weight: 600;
        color: #64748b;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        white-space: nowrap;
        border-bottom: 2px solid #e2e8f0;
    }
    
    /* SADECE Volume, 24s, 7g GİZLİ - Rank GÖRÜNÜR */
    .kripto-table thead th.th-volume,
    .kripto-table tbody td.td-volume,
    .kripto-table thead th.th-change24,
    .kripto-table tbody td.td-change24,
    .kripto-table thead th.th-change7d,
    .kripto-table tbody td.td-change7d {
        display: none !important;
    }
    
    /* 3 KOLON: KRİPTO PARA | FİYAT | PİYASA DEĞERİ */
    .kripto-table thead th.th-rank {
        display: none !important;
    }
    
    .kripto-table thead th.th-name {
        text-align: left;
        padding-left: 8px;
        width: 35%;
    }
    
    .kripto-table thead th.th-price {
        text-align: right;
        padding-right: 8px;
        width: 30%;
    }
    
    .kripto-table thead th.th-market {
        text-align: right;
        padding-right: 12px;
        width: 30%;
    }
    
    /* TBODY */
    .kripto-table tbody {
        display: table-row-group;
    }
    
    /* TR - Satırlar */
    .kripto-table tbody tr {
        display: table-row;
        border-bottom: 1px solid #f1f5f9;
    }
    
    .kripto-table tbody tr:last-child {
        border-bottom: none;
    }
    
    .kripto-table tbody tr:hover {
        background-color: #f8fafc;
    }
    
    /* TD - Hücreler */
    .kripto-table tbody td {
        display: table-cell;
        padding: 12px 8px;
        vertical-align: middle;
        font-size: 12px;
        color: #334155;
    }
    
    /* RANK - GİZLİ */
    .kripto-table tbody td.td-rank {
        display: none !important;
    }
    
    /* KRİPTO PARA - İkon + İsim */
    .kripto-table tbody td.td-name {
        text-align: left;
        padding-left: 8px;
    }
    
    /* Kripto info container */
    .crypto-info {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
    
    /* İKON - Küçük */
    .crypto-icon {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        font-weight: 700;
        color: #fff;
        flex-shrink: 0;
    }
    
    /* İsim wrapper */
    .crypto-name-wrap {
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
    }
    
    /* KRİPTO ADI */
    .crypto-name {
        font-size: 13px;
        font-weight: 600;
        color: #1e293b;
        line-height: 1.2;
        white-space: nowrap;
    }
    
    /* SEMBOL */
    .crypto-symbol {
        font-size: 11px;
        color: #94a3b8;
        font-weight: 500;
        line-height: 1;
    }
    
    /* FİYAT */
    .kripto-table tbody td.td-price {
        text-align: right;
        font-weight: 700;
        color: #1e293b;
        font-size: 13px;
        padding-right: 8px;
        white-space: nowrap;
    }
    
    /* PİYASA DEĞERİ */
    .kripto-table tbody td.td-market {
        text-align: right;
        font-weight: 600;
        color: #334155;
        font-size: 12px;
        padding-right: 12px;
        white-space: nowrap;
    }
}

/* ============================================
   DARK MODE
   ============================================ */

body.dark-mode .kripto-piyasasi-section {
    background: transparent;
}

body.dark-mode .kripto-table-wrapper {
    background: var(--dark-bg-secondary, #1e1e1e);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .kripto-table thead {
    background: var(--dark-bg-tertiary, #252525);
    border-bottom-color: var(--dark-border, #2a2a2a);
}

body.dark-mode .kripto-table th {
    color: var(--dark-text-secondary, #888);
}

body.dark-mode .kripto-table tbody tr {
    border-bottom-color: var(--dark-border, #2a2a2a);
}

body.dark-mode .kripto-table tbody tr:hover {
    background-color: var(--dark-bg-tertiary, #252525);
}

body.dark-mode .kripto-table td {
    color: var(--dark-text-primary, #e0e0e0);
}

body.dark-mode .kripto-table td.td-rank {
    color: var(--dark-text-secondary, #888);
}

body.dark-mode .crypto-name {
    color: var(--dark-text-primary, #e0e0e0);
}

body.dark-mode .crypto-symbol {
    color: var(--dark-text-secondary, #888);
}

body.dark-mode .kripto-loading {
    color: var(--dark-text-secondary, #888);
}

body.dark-mode .loading-spinner {
    border-color: #2a2a2a;
    border-top-color: #3b82f6;
}