.crw-wrapper {
    background: linear-gradient(135deg, #05070a 0%, #0d121f 50%, #05070a 100%);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 20px;
    padding: 0;
    font-family: 'Inter', sans-serif;
    color: #fff;
    margin: 30px 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

/* Page shell for crypto markets (desktop default) */
.crypto-page-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
}

.crw-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(20, 30, 50, 0.4) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.crw-h-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.crw-h-icon {
    width: 48px;
    height: 48px;
    background: rgba(245, 158, 11, 0.12);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.crw-h-title {
    font-size: 1.2rem;
    font-weight: 900;
    color: #f59e0b;
    margin: 0;
    letter-spacing: -0.3px;
}

.crw-h-subtitle {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 2px 0 0;
}

.crw-h-right {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 4px;
}

.crw-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.crw-status-badge.status-connected {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.crw-status-badge.status-disconnected {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.crw-status-badge.status-stale {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.crw-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-connected .crw-status-dot {
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
    animation: crw-pulse 1.5s infinite;
}

.status-disconnected .crw-status-dot {
    background: #ef4444;
    animation: none;
}

.status-stale .crw-status-dot {
    background: #f59e0b;
    animation: none;
}

.crw-status-text {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.crw-usdt-card {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.03);
    padding: 4px 10px;
    border-radius: 8px;
}

.crw-usdt-rate {
    color: #fbd38d;
    font-weight: 700;
    font-family: monospace;
}

@keyframes crw-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.8);
    }
}

.crw-table-responsive {
    width: 100%;
    overflow-x: auto;
}

.crw-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    text-align: right;
}

.crw-table th {
    padding: 16px 20px;
    font-size: 0.7rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.crw-table td {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    vertical-align: middle;
}

.crw-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.crw-th-left {
    text-align: left !important;
}

.crw-light-text {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    font-weight: 600;
}

.crw-name-cell {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
}

.crw-coin-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 1px;
}

.crw-coin-name {
    font-weight: 800;
    color: #f1f5f9;
    display: block;
    font-size: 0.95rem;
}

.crw-symbol {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 700;
}

.crw-num-td {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

.crw-price {
    font-weight: 700;
    color: #fff;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.crw-price-try {
    font-weight: 500;
    font-size: 0.85rem;
}

.crw-rate {
    font-size: 0.85rem;
    font-weight: 800;
    transition: color 0.3s ease;
}

.crw-up {
    color: #10b981;
}

.crw-down {
    color: #ef4444;
}

.crw-rate-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
}

.crw-up .crw-rate-badge {
    background: rgba(16, 185, 129, 0.15);
}

.crw-down .crw-rate-badge {
    background: rgba(239, 68, 68, 0.15);
}

/* Flash Animation Classes */
.crw-flash-up {
    animation: crw-flash-green 0.8s ease-out;
}

.crw-flash-down {
    animation: crw-flash-red 0.8s ease-out;
}

@keyframes crw-flash-green {
    0% {
        color: #10b981;
        text-shadow: 0 0 10px #10b981;
    }

    100% {
        color: #fff;
        text-shadow: none;
    }
}

@keyframes crw-flash-red {
    0% {
        color: #ef4444;
        text-shadow: 0 0 10px #ef4444;
    }

    100% {
        color: #fff;
        text-shadow: none;
    }
}

.crw-footer {
    padding: 12px 24px;
    text-align: right;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.crw-footer-text {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
}

/* MOBILE-FIRST EXPERIENCE TUNING */
@media (max-width: 640px) {
    /* Stretch page edge-to-edge inside mobile layout body */
    .crypto-page-shell {
        max-width: none;
        margin: 20px -20px 0;
        padding-top: 0;
    }

    /* Turn the terminal into a full-width, app-like panel */
    .crw-wrapper {
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        box-shadow: none;
    }

    .crypto-hero-v3 {
        padding: 16px 20px 10px;
        text-align: left;
    }

    .crypto-title-v3 {
        font-size: 1.7rem;
        line-height: 1.1;
    }

    .crypto-desc-v3 {
        font-size: 0.9rem;
        margin-top: 6px;
    }

    /* Altındaki sabit mobil menüye takılmaması için ekstra boşluk bırak */
    #crypto-price-widget {
        margin-bottom: 110px;
    }
}

/* Mobile Adaptations */
@media (max-width: 768px) {
    /* Tabloyu yatay kaydırma zorunluluğundan kurtar, tam genişlik olsun */
    .crw-table {
        min-width: 100%;
        table-layout: fixed;
    }

    .crw-header-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .crw-h-right {
        align-items: flex-start;
    }

    .crw-table th,
    .crw-table td {
        padding: 10px 6px;
        font-size: 0.82rem;
    }

    .crw-price-try {
        display: none;
    }

    /* Hide TRY on mobile list to save space */
    .crw-hide-mobile {
        display: none;
    }

    /* Coin isimlerini ve sembollerini mobilde biraz büyüt */
    .crw-coin-name {
        font-size: 1rem;
    }

    .crw-symbol {
        font-size: 0.8rem;
    }

    /* Sıralama başlıklarını dokunmatik için daha büyük hedefler yap */
    .crw-table th.crw-sortable {
        padding-top: 16px;
        padding-bottom: 16px;
    }

    /* Sayısal sütunlar (fiyat ve değişim) için soldan/sağdan boşlukları minimuma indir */
    .crw-num-td {
        padding-left: 4px;
        padding-right: 4px;
    }

    /* Varlık hücresindeki ikon ve metin arasındaki boşluğu daralt, ikonları küçült */
    .crw-name-cell {
        gap: 8px;
    }

    .crw-coin-icon {
        width: 30px;
        height: 30px;
        border-radius: 8px;
        font-size: 0.6rem;
    }

    /* Fiyat ve 24S değişim sütunları tablo genişliğinin dar bir kısmını kaplasın */
    .crw-table th:nth-child(3),
    .crw-table td:nth-child(3) {
        width: 26%;
    }

    .crw-table th:nth-child(5),
    .crw-table td:nth-child(5) {
        width: 22%;
    }
}

/* SEARCH & FILTER UI */
.crw-h-middle {
    flex: 1;
    max-width: 400px;
    margin: 0 30px;
}

.crw-search-box {
    position: relative;
    width: 100%;
}

.crw-search-box input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px 12px 40px;
    color: #fff;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.crw-search-box input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(245, 158, 11, 0.4);
    outline: none;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.1);
}

.crw-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.3);
}

.crw-filter-group {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.crw-filter-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 6px 14px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.crw-filter-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.crw-filter-btn.active {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
    color: #f59e0b;
}

@media (max-width: 992px) {
    .crw-h-middle {
        display: none;
    }

    /* Hide search on medium screens to avoid clutter, will add to header later if needed */
}

/* Küçük ekranlarda aramayı tekrar göster, tam genişlikte üstte dursun */
@media (max-width: 640px) {
    .crw-h-middle {
        display: block;
        width: 100%;
        max-width: none;
        margin: 8px 0 0;
    }

    .crw-header-section {
        align-items: stretch;
    }

    .crw-h-right {
        width: 100%;
    }

    .crw-filter-group {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .crw-filter-group {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .crw-filter-btn {
        white-space: nowrap;
    }
}

/* DRAWER STYLES */
.crw-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.crw-drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.crw-drawer {
    position: fixed;
    top: 0;
    right: -500px;
    width: 450px;
    height: 100%;
    background: #0d121f;
    border-left: 1px solid rgba(245, 158, 11, 0.2);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.8);
    z-index: 2001;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.crw-drawer.active {
    right: 0;
}

.crw-drawer-header {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.crw-drawer-coin-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.crw-drawer-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #f59e0b;
}

.crw-drawer-title {
    font-size: 1.4rem;
    font-weight: 900;
    margin: 0;
    color: #fff;
}

.crw-drawer-symbol {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 700;
}

.crw-drawer-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.5;
}

.crw-drawer-close:hover {
    opacity: 1;
}

.crw-drawer-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.crw-drawer-price-section {
    margin-bottom: 24px;
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.crw-drawer-price {
    font-size: 2.2rem;
    font-weight: 900;
    font-family: monospace;
}

.crw-drawer-change {
    font-size: 1rem;
    font-weight: 800;
}

.crw-chart-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 24px;
    min-height: 350px;
}

.crw-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.75rem;
    font-weight: 900;
    color: #64748b;
}

.crw-chart-intervals {
    display: flex;
    gap: 4px;
}

.crw-chart-intervals button {
    background: rgba(255, 255, 255, 0.03);
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 800;
    cursor: pointer;
}

.crw-chart-intervals button.active {
    background: #f59e0b22;
    color: #f59e0b;
}

.crw-chart-container {
    width: 100%;
    height: 280px;
    position: relative;
}

.crw-chart-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.8rem;
}

.crw-news-section {
    margin-top: 24px;
}

.crw-news-title {
    font-size: 0.9rem;
    font-weight: 900;
    color: #f59e0b;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.crw-news-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 12px;
    text-decoration: none;
    transition: 0.2s;
}

.crw-news-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.crw-news-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: #000;
}

.crw-news-text {
    flex: 1;
}

.crw-news-item-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.crw-news-date {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 4px;
    display: block;
}

@media (max-width: 550px) {
    .crw-drawer {
        width: 100%;
        right: -100%;
        border-left: none;
    }
}