/* User Profile Panel Styles */
.user-profile-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.user-profile-panel.active {
    right: 0;
}

.user-profile-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.user-profile-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.user-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.3);
}

.avatar-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 3px solid rgba(255,255,255,0.3);
}

.user-info h3 {
    margin: 0 0 5px 0;
    font-size: 20px;
}

.user-info p {
    margin: 0 0 8px 0;
    opacity: 0.9;
    font-size: 14px;
}

.user-badge {
    background: rgba(255,255,255,0.2);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.close-profile-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s;
}

.close-profile-btn:hover {
    background: rgba(255,255,255,0.2);
}

.user-profile-content {
    flex: 1;
    padding: 20px;
}

.profile-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.profile-section:last-child {
    border-bottom: none;
}

.profile-section h4 {
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-info .info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 8px 0;
}

.profile-info label {
    font-weight: 600;
    color: #555;
}

.profile-info span {
    color: #333;
}

.text-danger { color: #dc3545; }
.text-success { color: #28a745; }

.recent-orders, .favorite-products {
    min-height: 60px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.loading-orders, .loading-favorites {
    color: #666;
    font-style: italic;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.profile-actions .btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* Coin History Button */
.coin-history-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    border: none;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 12px rgba(255, 107, 53, 0.35);
    letter-spacing: 0.3px;
}

.coin-history-btn:hover {
    background: linear-gradient(135deg, #ff8c5a 0%, #ffaa4d 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(255, 107, 53, 0.45);
}

.coin-history-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.35);
}

.coin-history-btn i {
    font-size: 13px;
    transition: transform 0.3s;
}

.coin-history-btn:hover i {
    transform: rotate(-15deg);
}

.coin-history-btn span {
    display: inline-block;
}

.coin-balance-card {
    position: relative;
    padding-right: 100px;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.modal-dialog {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .user-profile-panel {
        width: 100vw;
        right: -100vw;
    }
    
    .coin-balance-card {
        padding-right: 60px;
    }
    
    .coin-history-btn {
        padding: 10px;
        min-width: 44px;
        justify-content: center;
        border-radius: 50%;
        gap: 0;
    }
    
    .coin-history-btn span {
        display: none;
    }
    
    .coin-history-btn i {
        margin: 0;
        font-size: 18px;
    }
}