/**
 * Market Sayfası Stilleri
 * Slot Icardi - Market System - Modern Minimalist
 */

/* Market Hero Section - Kompakt & Sade */
.market-hero {
    background: linear-gradient(180deg, rgba(30, 37, 48, 0.5) 0%, transparent 100%);
    padding: 20px 0 15px;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
}

.market-hero-content {
    text-align: center;
}

.market-hero .hero-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
}

.market-hero .hero-title i {
    margin-right: 8px;
    color: #FFD700;
}

.market-hero .hero-subtitle {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.65);
    margin-bottom: 12px;
}

/* User Balance Card - Kompakt */
.user-balance-card {
    display: inline-flex;
    align-items: center;
    background: #252936;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 50px;
    padding: 8px 24px;
    margin-top: 4px;
    transition: all 0.2s ease;
}

.user-balance-card:hover {
    border-color: var(--color-bright-red);
    background: rgba(30, 37, 48, 0.9);
}

.user-balance-card .balance-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 16px;
    color: #0a0a0f;
}

.user-balance-card .balance-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.user-balance-card .balance-label {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.user-balance-card .balance-amount {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.user-balance-card .balance-currency {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
}

/* Login Prompt */
.login-prompt {
    display: inline-block;
    background: rgba(20, 20, 25, 0.7);
    border: 1.5px solid rgba(255, 0, 64, 0.3);
    border-radius: 12px;
    padding: 20px 32px;
    margin-top: 12px;
}

.login-prompt p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.login-prompt .btn {
    background: #FFD700;
    color: white;
    border: none;
    padding: 10px 24px;
    font-weight: 600;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.login-prompt .btn:hover {
    background: #ffa500;
    transform: translateY(-1px);
}

/* Market Section */
.market-section {
    padding: 24px 0;
    background: transparent;
    min-height: 60vh;
}

/* Market Tabs */
.market-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.market-tab {
    background: rgba(20, 20, 25, 0.6);
    border: 1.5px solid rgba(255, 0, 64, 0.25);
    border-radius: 50px;
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255,255,255,0.65);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.market-tab:hover {
    border-color: rgba(255, 0, 64, 0.5);
    color: rgba(255,255,255,0.85);
    background: rgba(25, 25, 30, 0.7);
}

.market-tab.active {
    background: #FFD700;
    border-color: #FFD700;
    color: white;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Market Grid */
.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

/* Market Item Card */
.market-item {
    background: #252936;
    border-radius: 12px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.market-item:hover {
    transform: translateY(-2px);
    border-color: var(--color-bright-red);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.market-item.out-of-stock {
    opacity: 0.5;
}

.market-item.out-of-stock::after {
    content: 'STOKTA YOK';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-10deg);
    background: rgba(220,53,69,0.95);
    color: white;
    padding: 10px 30px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 8px;
    z-index: 10;
    pointer-events: none;
}

.item-header {
    background: rgba(255, 0, 64, 0.08);
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 0, 64, 0.15);
}

.item-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
}

.item-type.freespin {
    background: #ff0040;
    color: white;
}

.item-type.usdt {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #0a0a0f;
    font-weight: 700;
}

.site-logo {
    max-width: 70px;
    max-height: 32px;
    object-fit: contain;
}

.item-body {
    padding: 16px;
    flex: 1;
}

.item-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.item-description {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.65);
    margin-bottom: 12px;
    line-height: 1.4;
}

.item-site {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ff2d55;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.875rem;
}

.item-amount {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
    color: rgba(255,255,255,0.85);
    margin-top: 8px;
    font-weight: 600;
}

.item-footer {
    padding: 14px 16px;
    background: rgba(10, 10, 15, 0.5);
    border-top: 1px solid rgba(255, 0, 64, 0.15);
}

.item-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.price-label {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
}

.price-amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffd700;
}

.item-stock {
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.65);
    margin-bottom: 12px;
    padding: 4px 8px;
    background: rgba(255, 0, 64, 0.08);
    border-radius: 4px;
}

.btn-purchase {
    width: 100%;
    background: #ff0040;
    border: none;
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-purchase:hover:not(.disabled) {
    background: #ff2d55;
    transform: translateY(-1px);
}

.btn-purchase.disabled {
    background: rgba(60, 60, 65, 0.5);
    cursor: not-allowed;
    opacity: 0.5;
}

/* Loading & Empty States */
.loading-spinner,
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: rgba(255,255,255,0.65);
}

.loading-spinner i,
.empty-state i {
    color: #ff0040;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
}

.empty-state p {
    color: rgba(255,255,255,0.65);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

/* Orders Grid */
.orders-container {
    max-width: 1200px;
    margin: 0 auto;
}

.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.order-card {
    background: rgba(20, 20, 25, 0.7);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    border: 1.5px solid rgba(255, 0, 64, 0.25);
}

.order-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 0, 64, 0.5);
    background: rgba(25, 25, 30, 0.8);
}

.order-card.pending {
    border-left-color: #ffc107;
}

.order-card.completed {
    border-left-color: #28a745;
}

.order-card.cancelled {
    border-left-color: #dc3545;
}

.order-header {
    background: rgba(255, 0, 64, 0.08);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 0, 64, 0.15);
}

.order-id {
    font-weight: 600;
    color: white;
    font-size: 1rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-badge.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-badge.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.order-body {
    padding: 16px;
}

.order-body h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}

.order-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.75);
}

.detail-item i {
    color: #ff2d55;
    font-size: 0.8rem;
}

.delivery-code,
.wallet-address,
.admin-note {
    background: rgba(255, 0, 64, 0.08);
    padding: 10px;
    border-radius: 6px;
    margin-top: 8px;
    border: 1px solid rgba(255, 0, 64, 0.15);
}

.delivery-code strong,
.wallet-address strong,
.admin-note strong {
    display: block;
    margin-bottom: 6px;
    color: white;
    font-size: 0.85rem;
}

.delivery-code code,
.wallet-address code {
    background: rgba(10, 10, 15, 0.6);
    padding: 6px 10px;
    border-radius: 4px;
    display: inline-block;
    font-family: 'Courier New', monospace;
    color: #ffd700;
    font-weight: 500;
    word-break: break-all;
    font-size: 0.85rem;
}

.admin-note p {
    color: rgba(255,255,255,0.75);
    font-size: 0.85rem;
    margin: 0;
}

/* Purchase Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
}

.modal-container {
    position: relative;
    background: rgba(20, 20, 25, 0.95);
    border: 1.5px solid rgba(255, 0, 64, 0.4);
    border-radius: 16px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.25s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: #ff0040;
    color: white;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.modal-close {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.modal-close:hover {
    background: rgba(255,255,255,0.25);
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
}

.purchase-details {
    margin-bottom: 16px;
}

.purchase-item-info h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.purchase-item-info .text-muted {
    color: rgba(255,255,255,0.65);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.purchase-specs {
    background: rgba(255, 0, 64, 0.08);
    border: 1px solid rgba(255, 0, 64, 0.15);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 0, 64, 0.1);
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-label {
    color: rgba(255,255,255,0.65);
    font-size: 0.9rem;
}

.spec-value {
    font-weight: 600;
    color: white;
    font-size: 0.95rem;
}

.spec-value.price-highlight {
    color: #ffd700;
    font-size: 1.2rem;
    font-weight: 700;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: white;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.form-group input.form-control {
    width: 100%;
    padding: 10px 14px;
    background: rgba(10, 10, 15, 0.6);
    border: 1.5px solid rgba(255, 0, 64, 0.25);
    border-radius: 8px;
    font-size: 0.9rem;
    color: white;
    transition: all 0.2s ease;
}

.form-group input.form-control:focus {
    outline: none;
    border-color: rgba(255, 0, 64, 0.5);
    background: rgba(10, 10, 15, 0.8);
}

.form-text {
    display: block;
    margin-top: 4px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.55);
}

.balance-check {
    background: rgba(255, 0, 64, 0.08);
    border: 1px solid rgba(255, 0, 64, 0.15);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.balance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
}

.balance-item.total {
    border-top: 1.5px solid rgba(255, 0, 64, 0.3);
    padding-top: 12px;
    margin-top: 8px;
    font-size: 1rem;
    color: white;
    font-weight: 700;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.15);
    color: #ff6b6b;
    border: 1.5px solid rgba(220, 53, 69, 0.3);
}

.btn-success {
    background: #ff0040;
    border: none;
    color: white;
    padding: 13px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-success:hover {
    background: #ff2d55;
    transform: translateY(-1px);
}

.btn-block {
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .market-hero {
        padding: 16px 0 12px;
    }
    
    .market-hero .hero-title {
        font-size: 1.6rem;
    }
    
    .market-hero .hero-subtitle {
        font-size: 0.875rem;
        margin-bottom: 10px;
    }
    
    .user-balance-card {
        padding: 6px 18px;
    }
    
    .user-balance-card .balance-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
        margin-right: 10px;
    }
    
    .user-balance-card .balance-info {
        gap: 6px;
    }
    
    .user-balance-card .balance-label {
        font-size: 0.65rem;
    }
    
    .user-balance-card .balance-amount {
        font-size: 1.2rem;
    }
    
    .user-balance-card .balance-currency {
        font-size: 0.75rem;
    }
    
    .market-section {
        padding: 16px 0;
    }
    
    .market-tabs {
        gap: 8px;
        margin-bottom: 16px;
    }
    
    .market-tab {
        padding: 8px 18px;
        font-size: 0.85rem;
    }
    
    .market-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .item-header {
        padding: 12px;
    }
    
    .item-body {
        padding: 12px;
    }
    
    .item-footer {
        padding: 12px;
    }
    
    .orders-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .order-details {
        grid-template-columns: 1fr;
    }
    
    .modal-container {
        margin: 16px;
        max-width: calc(100% - 32px);
    }
    
    .modal-header {
        padding: 14px 16px;
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 16px;
    }
}

/* Utility Classes */
.text-danger {
    color: #ff6b6b !important;
}
