.coins-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    padding: 2rem 1rem;
}

.coins-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 2rem;
}

.coins-sidebar {
    width: 220px;
    flex-shrink: 0;
}

.coins-nav {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.coins-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: 0.25rem;
}

.coins-nav .nav-item:hover {
    background: #f5f7fa;
    color: #2B5F75;
}

.coins-nav .nav-item.active {
    background: linear-gradient(135deg, #2B5F75 0%, #3d7a94 100%);
    color: white;
}

.coins-nav .nav-icon {
    font-size: 1.25rem;
}

.coins-main {
    flex: 1;
    min-width: 0;
}

.balance-section {
    margin-bottom: 2rem;
}

.balance-card {
    background: linear-gradient(135deg, #2B5F75 0%, #3d7a94 100%);
    border-radius: 16px;
    padding: 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.balance-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.balance-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.balance-info {
    display: flex;
    flex-direction: column;
}

.balance-label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.balance-value {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.balance-stats {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.balance-stats .stat-item {
    display: flex;
    flex-direction: column;
}

.balance-stats .stat-value {
    font-size: 1.5rem;
    font-weight: 600;
}

.balance-stats .stat-label {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

.balance-stats .stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.quick-stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.quick-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-stat-icon.today {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #4caf50;
}

.quick-stat-icon.month {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #2196f3;
}

.quick-stat-icon.spent {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
    color: #e91e63;
}

.quick-stat-info {
    display: flex;
    flex-direction: column;
}

.quick-stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.quick-stat-label {
    font-size: 0.75rem;
    color: #888;
    margin-top: 0.125rem;
}

.trend-section,
.transactions-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

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

.section-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.trend-tabs {
    display: flex;
    gap: 0.5rem;
}

.trend-tab {
    padding: 0.5rem 1rem;
    border: none;
    background: #f5f7fa;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.trend-tab:hover {
    background: #e8eaed;
}

.trend-tab.active {
    background: #2B5F75;
    color: white;
}

.trend-chart-container {
    height: 250px;
    position: relative;
}

.chart-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #999;
}

.filter-group {
    display: flex;
    gap: 0.75rem;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #666;
    background: white;
    cursor: pointer;
    outline: none;
}

.filter-select:focus {
    border-color: #2B5F75;
}

.transactions-list {
    min-height: 200px;
}

.transaction-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-item:hover {
    background: #f9fafb;
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.25rem;
}

.transaction-icon.earn {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.transaction-icon.spend {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
}

.transaction-info {
    flex: 1;
}

.transaction-reason {
    font-size: 0.9375rem;
    color: #333;
    margin-bottom: 0.25rem;
}

.transaction-time {
    font-size: 0.75rem;
    color: #999;
}

.transaction-amount {
    font-size: 1.125rem;
    font-weight: 600;
}

.transaction-amount.positive {
    color: #4caf50;
}

.transaction-amount.negative {
    color: #e91e63;
}

.load-more-container {
    text-align: center;
    padding: 1rem 0;
}

.load-more-btn {
    padding: 0.75rem 2rem;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.load-more-btn:hover {
    border-color: #2B5F75;
    color: #2B5F75;
}

.loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #999;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f0f0f0;
    border-top-color: #2B5F75;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.sidebar-balance-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.sidebar-balance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.sidebar-balance-label {
    font-size: 0.875rem;
    color: #666;
}

.sidebar-balance-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2B5F75;
}

.sidebar-balance-link {
    font-size: 0.8125rem;
    color: #2B5F75;
    text-decoration: none;
}

.sidebar-balance-link:hover {
    text-decoration: underline;
}

.exchange-header-section {
    margin-bottom: 2rem;
}

.exchange-header {
    margin-bottom: 1.5rem;
}

.exchange-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 0.5rem 0;
}

.exchange-header p {
    font-size: 0.9375rem;
    color: #666;
    margin: 0;
}

.exchange-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.exchange-tab {
    padding: 0.625rem 1.25rem;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 20px;
    font-size: 0.875rem;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.exchange-tab:hover {
    border-color: #2B5F75;
    color: #2B5F75;
}

.exchange-tab.active {
    background: #2B5F75;
    border-color: #2B5F75;
    color: white;
}

.products-section {
    margin-bottom: 2rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.product-image {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image-placeholder {
    font-size: 3rem;
    color: #ccc;
}

.product-info {
    padding: 1rem;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.5rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-description {
    font-size: 0.8125rem;
    color: #888;
    margin: 0 0 0.75rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    height: 2.4em;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.product-price .coin-icon {
    font-size: 0.875rem;
}

.product-price .price-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2B5F75;
}

.product-stock {
    font-size: 0.75rem;
    color: #999;
}

.product-stock.low {
    color: #ff9800;
}

.product-stock.out {
    color: #f44336;
}

.product-status-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.product-status-badge.hot {
    background: #ff5722;
    color: white;
}

.product-status-badge.new {
    background: #4caf50;
    color: white;
}

.exchange-history-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.history-list {
    min-height: 150px;
}

.history-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item:hover {
    background: #f9fafb;
}

.history-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: #f5f7fa;
    margin-right: 1rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-info {
    flex: 1;
}

.history-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.25rem;
}

.history-time {
    font-size: 0.75rem;
    color: #999;
}

.history-status {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.history-status.pending {
    background: #fff3e0;
    color: #ff9800;
}

.history-status.completed {
    background: #e8f5e9;
    color: #4caf50;
}

.history-status.cancelled {
    background: #f5f5f5;
    color: #999;
}

.history-status.rejected {
    background: #ffebee;
    color: #f44336;
}

.history-coin {
    font-size: 0.875rem;
    font-weight: 600;
    color: #e91e63;
    margin-left: 1rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.125rem;
    color: #333;
    margin: 0 0 0.5rem 0;
}

.empty-state p {
    font-size: 0.875rem;
    color: #888;
    margin: 0;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-container {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-container.modal-large {
    max-width: 640px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f7fa;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e8eaed;
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #f0f0f0;
}

.btn-primary {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #2B5F75 0%, #3d7a94 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #666;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #f5f7fa;
    border-color: #ccc;
}

.exchange-product-preview {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.preview-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background: #e8eaed;
    overflow: hidden;
    flex-shrink: 0;
}

.preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-info {
    flex: 1;
}

.preview-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.5rem 0;
}

.preview-info p {
    font-size: 0.8125rem;
    color: #666;
    margin: 0 0 0.75rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.preview-price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.price-label {
    font-size: 0.75rem;
    color: #888;
}

.price-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2B5F75;
}

.exchange-form .form-group {
    margin-bottom: 1rem;
}

.exchange-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.exchange-form input,
.exchange-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.exchange-form input:focus,
.exchange-form textarea:focus {
    border-color: #2B5F75;
}

.exchange-form textarea {
    resize: vertical;
    min-height: 60px;
}

.exchange-notice {
    padding: 0.75rem;
    background: #fff8e1;
    border-radius: 8px;
    font-size: 0.8125rem;
    color: #f57c00;
}

.product-detail-content {
    display: flex;
    gap: 1.5rem;
}

.product-detail-image {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    background: #f5f7fa;
    overflow: hidden;
    flex-shrink: 0;
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-info {
    flex: 1;
}

.product-detail-info h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 1rem 0;
}

.product-detail-info .description {
    font-size: 0.9375rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.product-detail-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 0.25rem;
}

.meta-value {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
}

.meta-value.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2B5F75;
}

@media (max-width: 768px) {
    .coins-container {
        flex-direction: column;
    }

    .coins-sidebar {
        width: 100%;
    }

    .coins-nav {
        display: flex;
        overflow-x: auto;
        padding: 0.5rem;
    }

    .coins-nav .nav-item {
        flex-shrink: 0;
        padding: 0.75rem 1rem;
    }

    .sidebar-balance-card {
        display: none;
    }

    .quick-stats {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-detail-content {
        flex-direction: column;
    }

    .product-detail-image {
        width: 100%;
        height: 200px;
    }
}
